Skip to content

Commit

Permalink
Show error messages when clearing a log on the web interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaberez committed Nov 15, 2015
1 parent 34ede9a commit 4306528
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions supervisor/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,16 @@ def restartprocess():
return restartprocess

elif action == 'clearlog':
callback = rpcinterface.supervisor.clearProcessLogs(
namespec)
try:
callback = rpcinterface.supervisor.clearProcessLogs(
namespec)
except RPCError as e:
def clearerr():
return 'unexpected rpc fault [%d] %s' % (
e.code, e.text)
clearerr.delay = 0.05
return clearerr

def clearlog():
return 'Log for %s cleared' % namespec
clearlog.delay = 0.05
Expand Down

0 comments on commit 4306528

Please sign in to comment.