Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do not fail if addstr returns ERR

  • Loading branch information...
commit b909a606b95b418b1a1010950f43fdf1fe52681e 1 parent 674bdbb
@rdeioris rdeioris authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 uwsgitop
View
13 uwsgitop
@@ -163,11 +163,14 @@ while True:
color = curses.color_pair(3)
if worker['status'].startswith('sig'):
color = curses.color_pair(4)
- screen.addstr(pos, 0, " %d\t%.2f\t%d\t%d\t%d\t%d\t%s\t%dms\t%dM\t%dM\t%s\t%s" % (
- worker['id'], calc_percent(tot, worker['requests']), worker['pid'], worker['requests'], worker['exceptions'], sigs, worker['status'],
- worker['avg_rt']/1000, worker['rss']/1024/1024, worker['vsz']/1024/1024,
- wtx, wrunt
- ), color)
+ try:
+ screen.addstr(pos, 0, " %d\t%.2f\t%d\t%d\t%d\t%d\t%s\t%dms\t%dM\t%dM\t%s\t%s" % (
+ worker['id'], calc_percent(tot, worker['requests']), worker['pid'], worker['requests'], worker['exceptions'], sigs, worker['status'],
+ worker['avg_rt']/1000, worker['rss']/1024/1024, worker['vsz']/1024/1024,
+ wtx, wrunt
+ ), color)
+ except:
+ pass
pos += 1
screen.refresh()
Please sign in to comment.
Something went wrong with that request. Please try again.