summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/gitautodeploy.py
diff options
context:
space:
mode:
authorVlad Ionescu <vlad@vladionescu.com>2016-05-25 15:21:55 -0700
committerVlad Ionescu <vlad@vladionescu.com>2016-05-25 15:21:55 -0700
commit7b79fcf9d1bd577c9fdbd42d419002ef16f1c879 (patch)
treeb7da0e5d3c635bb7c9091b39621c3bc8e48af532 /gitautodeploy/gitautodeploy.py
parent8491495059b1de1f23f4729b256708b0415f5bde (diff)
downloadGit-Auto-Deploy-7b79fcf9d1bd577c9fdbd42d419002ef16f1c879.zip
Git-Auto-Deploy-7b79fcf9d1bd577c9fdbd42d419002ef16f1c879.tar.gz
Git-Auto-Deploy-7b79fcf9d1bd577c9fdbd42d419002ef16f1c879.tar.bz2
Signal names must be quoted in hasattr()
Diffstat (limited to 'gitautodeploy/gitautodeploy.py')
-rw-r--r--gitautodeploy/gitautodeploy.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gitautodeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py
index a520a91..8f3b172 100644
--- a/gitautodeploy/gitautodeploy.py
+++ b/gitautodeploy/gitautodeploy.py
@@ -160,9 +160,9 @@ class GitAutoDeploy(object):
logger.warning('No process is currently using port %s.' % self._config['port'])
return False
- if hasattr(signal, SIGKILL):
+ if hasattr(signal, 'SIGKILL'):
os.kill(pid, signal.SIGKILL)
- elif hasattr(signal, SIGHUP):
+ elif hasattr(signal, 'SIGHUP'):
os.kill(pid, signal.SIGHUP)
else:
os.kill(pid, 1)
@@ -416,13 +416,13 @@ def main():
app = GitAutoDeploy()
- if hasattr(signal, SIGHUP):
+ if hasattr(signal, 'SIGHUP'):
signal.signal(signal.SIGHUP, app.signal_handler)
- if hasattr(signal, SIGINT):
+ if hasattr(signal, 'SIGINT'):
signal.signal(signal.SIGINT, app.signal_handler)
- if hasattr(signal, SIGABRT):
+ if hasattr(signal, 'SIGABRT'):
signal.signal(signal.SIGABRT, app.signal_handler)
- if hasattr(signal, SIGPIPE) and hasattr(signal, SIG_IGN):
+ if hasattr(signal, 'SIGPIPE') and hasattr(signal, 'SIG_IGN'):
signal.signal(signal.SIGPIPE, signal.SIG_IGN)
config = get_config_defaults()