From 52428f515346871e9b37855cad7d27109057013d Mon Sep 17 00:00:00 2001 From: Aaron Meihm Date: Thu, 10 Nov 2016 15:17:14 -0600 Subject: [PATCH] move things around a bit to work with uwsgi --- scanapi/scanapi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scanapi/scanapi.py b/scanapi/scanapi.py index e2b3a48..0993b67 100755 --- a/scanapi/scanapi.py +++ b/scanapi/scanapi.py @@ -292,7 +292,8 @@ def domain(): sys.stderr.write('Error parsing config file: {}\n'.format(e)) sys.exit(1) scanner = ScanAPIScanner(cfg) - app.run() + if __name__ == '__main__': + app.run() def valid_appkey(viewfunc): @wraps(viewfunc) @@ -354,5 +355,4 @@ def api_get_policies(): def api_root(): return json.dumps({'status': 'ok'}) -if __name__ == '__main__': - domain() +domain()