stop_pending also counts as not running

This commit is contained in:
Min RK
2016-03-07 14:27:40 +01:00
parent da1b9bdd80
commit 82643adfb6

View File

@@ -145,8 +145,8 @@ class User(HasTraits):
@property
def running(self):
"""property for whether a user has a running server"""
if self.spawn_pending:
return False # server is not running if spawn is still pending
if self.spawn_pending or self.stop_pending:
return False # server is not running if spawn or stop is still pending
if self.server is None:
return False
return True