Skip to content

Commit

Permalink
Fix TypeError in pid checking
Browse files Browse the repository at this point in the history
Closes #745
  • Loading branch information
embolalia committed Feb 21, 2015
1 parent 1121027 commit 00875e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion willie.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def main(argv=None):
else:
os.kill(old_pid, signal.SIGTERM)
sys.exit(0)
elif not tools.check_pid(old_pid) and (opts.kill or opts.quit):
elif old_pid is None or (not tools.check_pid(old_pid)
and (opts.kill or opts.quit)):
stderr('Willie is not running!')
sys.exit(1)
elif opts.quit or opts.kill:
Expand Down

0 comments on commit 00875e3

Please sign in to comment.