Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1.    def run_command(self):
  2.         try:
  3.             self.start = dt.datetime.now()
  4.             return_code = subprocess.call(self.command, shell=True)
  5.             self.duration = dt.datetime.now() - self.start
  6.  
  7.             self.display_notification(return_code)
  8.  
  9.             sys.exit(return_code)
  10.         except KeyboardInterrupt:
  11.             cr.handle_interrupt()
  12.             sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement