summaryrefslogtreecommitdiff
path: root/bin
diff options
authorTaihsiang Ho <taihsiang.ho@canonical.com>2014-05-28 17:04:10 +0800
committerTaihsiang Ho <taihsiang.ho@canonical.com>2014-05-28 17:04:10 +0800
commit112dd66aa471dbefb5cc4cf9c945ac280c969b46 (patch)
tree086bda353cb06d18ff2433814c729755c292bcd0 /bin
parent141358ce43f7e13eaac5e02df3d30f9b9b4d6dd5 (diff)
use rstrip to make the code easiler to read
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lock_screen_watcher2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/lock_screen_watcher b/bin/lock_screen_watcher
index 57efdef..b8dd886 100755
--- a/bin/lock_screen_watcher
+++ b/bin/lock_screen_watcher
@@ -39,7 +39,7 @@ class SceenSaverStatusHelper(threading.Thread):
stdout, stderr = p.communicate()
# parse the stdout string from the command "gnome-screensaver-command -q"
# the result should be "active" or "inactive"
- if "active" == stdout.decode().split(" ")[-1][0:-1] :
+ if "active" == stdout.decode().split(" ")[-1].rstrip() :
print("the screensaver is active")
self._loop.quit()