Skip to content

Commit

Permalink
exception
Browse files Browse the repository at this point in the history
  • Loading branch information
stevetu committed Dec 21, 2012
1 parent df21452 commit 0dabbf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uwsgi_
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ env.addr = 127.0.0.1:4999
UWSGI_STATS = ''

import os, os.path, sys, time, datetime, json, re, socket

from pprint import pformat

UWSGI_STATS = UWSGI_STATS or os.environ.get('addr', '')
if not UWSGI_STATS:
raise Exception('uWSGI stats config not found.')
raise Exception('uWSGI stats config not found. %s' % pformat(os.environ))


if ':' in UWSGI_STATS:
Expand Down Expand Up @@ -80,7 +80,7 @@ else:
except:
import traceback
traceback.print_exc()
raise Exception("unable to get uWSGI statistics")
raise Exception("unable to get uWSGI stats at %s" % addr)

dd = json.loads(js or '{}')
workers = dd.get('workers', [])
Expand Down

0 comments on commit 0dabbf1

Please sign in to comment.