Permalink
Browse files

Don't assume that jails exist

  • Loading branch information...
1 parent 6bf0ef5 commit 4b191e34ddbd2777f7bf908d68547a2a4cf4fa78 @jhixson74 jhixson74 committed Jun 26, 2013
Showing with 13 additions and 10 deletions.
  1. +13 −10 gui/middleware/notifier.py
View
@@ -807,19 +807,22 @@ def _started_plugins(self, jail=None, plugin=None):
def pluginjail_running(self, pjail=None):
running = False
- wlist = Warden().list()
- for wj in wlist:
- wj = WardenJail(**wj)
- if pjail and wj.host == pjail:
- if wj.type == WARDEN_TYPE_PLUGINJAIL and \
+ try:
+ wlist = Warden().list()
+ for wj in wlist:
+ wj = WardenJail(**wj)
+ if pjail and wj.host == pjail:
+ if wj.type == WARDEN_TYPE_PLUGINJAIL and \
+ wj.status == WARDEN_STATUS_RUNNING:
+ running = True
+ break
+
+ elif not pjail and wj.type == WARDEN_TYPE_PLUGINJAIL and \
wj.status == WARDEN_STATUS_RUNNING:
running = True
break
-
- elif not pjail and wj.type == WARDEN_TYPE_PLUGINJAIL and \
- wj.status == WARDEN_STATUS_RUNNING:
- running = True
- break
+ except:
+ pass
return running

0 comments on commit 4b191e3

Please sign in to comment.