summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-02 07:16:01 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-02 07:16:01 +0200
commit1c6457a71d11759ea8c62feac94d47d3becfc062 (patch)
treedbf01e1a3bdbbed9ffd1caa718be9eeec56fa15b /module/plugins
parentUpdate some plugins (diff)
downloadpyload-1c6457a71d11759ea8c62feac94d47d3becfc062.tar.xz
[AntiStandby] Improve linux_standby
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/AntiStandby.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py
index e669ae4f3..4b35c787a 100644
--- a/module/plugins/hooks/AntiStandby.py
+++ b/module/plugins/hooks/AntiStandby.py
@@ -27,7 +27,7 @@ class Kernel32(object):
class AntiStandby(Addon):
__name__ = "AntiStandby"
__type__ = "hook"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__config__ = [("activated", "bool", "Activated" , True ),
@@ -130,13 +130,17 @@ class AntiStandby(Addon):
elif not self.pid:
self.pid = subprocess.Popen(["caffeine"])
+ except Exception, e:
+ self.log_warning(_("Unable to change system power state"), e)
+
+ try:
if display:
subprocess.call(["xset", "+dpms", "s", "default"])
else:
subprocess.call(["xset", "-dpms", "s", "off"])
except Exception, e:
- self.log_warning(_("Unable to change power state"), e)
+ self.log_warning(_("Unable to change display power state"), e)
@Expose