Skip to content

Commit

Permalink
Don't assume that jails exist
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hixson committed Jun 26, 2013
1 parent 6bf0ef5 commit 4b191e3
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions gui/middleware/notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4b191e3

Please sign in to comment.