Commits

Smith Dhumbumroong  committed 087ea20

Add check to see if command to run is set.

  • Participants
  • Parent commits 834c4e0
  • Tags v0.2

Comments (0)

Files changed (1)

File PyShutdownBox.py

             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()