diff options
author | Alexander Nestorov <alexandernst@gmail.com> | 2014-09-20 15:25:18 +0200 |
---|---|---|
committer | Alexander Nestorov <alexandernst@gmail.com> | 2014-09-20 15:25:18 +0200 |
commit | ec0ef6d663fa385c3be596e6017d8c85bbfda9e4 (patch) | |
tree | fcc10c0949eb290a6efe2b4ebb328ec0c88dfce1 /GitAutoDeploy.py | |
parent | 4cceef6a0d6a652698f2f6c978913dd909f80c9f (diff) | |
download | Git-Auto-Deploy-ec0ef6d663fa385c3be596e6017d8c85bbfda9e4.zip Git-Auto-Deploy-ec0ef6d663fa385c3be596e6017d8c85bbfda9e4.tar.gz Git-Auto-Deploy-ec0ef6d663fa385c3be596e6017d8c85bbfda9e4.tar.bz2 |
Simplify a little bit the signal handler
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-x | GitAutoDeploy.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py index 03357d6..e04407c 100755 --- a/GitAutoDeploy.py +++ b/GitAutoDeploy.py @@ -202,16 +202,14 @@ class GitAutoDeployMain: sys.exit(0) def signal_handler(self, signum, frame): + self.stop() if(signum == 1): - self.stop() self.run() + return elif(signum == 2): - print 'Keyboard Interrupt!!!' - self.stop() - self.exit() - else: - self.stop() - self.exit() + print '\nKeyboard Interrupt!!!' + + self.exit() if __name__ == '__main__': gadm = GitAutoDeployMain() |