Commits

Smith Dhumbumroong committed 087ea20

Add check to see if command to run is set.

Comments (0)

Files changed (1)

             pman.pkill(i.strip())
 
     def logout(self, widget):
+        if not self.rc_shutdown == None:
+            subprocess.call(self.rc_shutdown)
         self.CloseProcesses(self.plist)
-        subprocess.call(self.rc_shutdown)
 
         pman = ProcessManager()
         pman.pkill('openbox')
 
     def restart(self, widget):
+        if not self.rc_shutdown == None:
+            subprocess.call(self.rc_shutdown)
         self.CloseProcesses(self.plist)
-        subprocess.call(self.rc_shutdown)
 
         self.pwm.Restart()
 
     def shutdown(self, widget):
+        if not self.rc_shutdown == None:
+            subprocess.call(self.rc_shutdown)
         self.CloseProcesses(self.plist)
-        subprocess.call(self.rc_shutdown)
 
         self.pwm.Stop()