Skip to content

Commit

Permalink
Merge pull request #264 from oliverlee/fix-server-shutdown-error
Browse files Browse the repository at this point in the history
Don't assume user enters input in server shutdown
  • Loading branch information
moorepants committed Oct 14, 2015
2 parents e43a79c + 4270cf6 commit d57dac0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pydy/viz/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def _stop_server(self, signal, frame):
"""
res = raw_input("Shutdown this visualization server ([y]/n)? ")
res = res.lower()[0]
if res == '' or res == 'y':
if not res or res[0].lower() == 'y':
print("Shutdown confirmed")
print("Shutting down server...")
self.httpd.stop()
Expand Down

0 comments on commit d57dac0

Please sign in to comment.