Author: duncan
Date: Sun Mar  4 14:11:39 2007
New Revision: 9300

Modified:
   branches/rel-1/freevo/src/plugins/autoshutdown.py

Log:
[ 1612257 ] many autoshutdown issues
Patch from A C G Mennucc applied


Modified: branches/rel-1/freevo/src/plugins/autoshutdown.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/autoshutdown.py   (original)
+++ branches/rel-1/freevo/src/plugins/autoshutdown.py   Sun Mar  4 14:11:39 2007
@@ -545,10 +545,10 @@
             cmd = "%s %s --settime %d" % (config.AUTOSHUTDOWN_WAKEUP_CMD, \
                 config.AUTOSHUTDOWN_NVRAM_OPT, int(wakeup_utc_s))
             ec = __syscall(cmd)
-            if ec < 0 and ec > 1:
+            if  ec != 256 and ec != 0 :
                 _debug_("Wakeup-command command '%s' failed!" % cmd,0)
                 raise ExInternalError
-            elif ec == 1 or config.AUTOSHUTDOWN_BIOS_NEEDS_REBOOT:
+            elif ec == 256 or config.AUTOSHUTDOWN_BIOS_NEEDS_REBOOT:
                 # needs a reboot
                 if config.AUTOSHUTDOWN_BOOT_LOADER.upper() == "GRUB":
                     if config.AUTOSHUTDOWN_REMOUNT_BOOT_CMD:
@@ -722,7 +722,7 @@
         searchstring = delimiter.join(config.AUTOSHUTDOWN_PROCESS_LIST)
         cmd = 'ps -eo cmd | egrep -v "grep" | egrep 
"(/|[[:space:]]|^)(%s)($|[[:space:]])"' % searchstring
         result = __syscall(cmd)
-        if (result == 0):
+        if result == 0:
             _debug_('external process(es) running')
             return True
         else:

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to