brother_ql.web: print exceptions to stderr & listen @ public IPs

This commit is contained in:
Philipp Klaus
2016-07-22 18:33:02 +02:00
parent 0c241adbdf
commit 665a2fc865
+2 -1
View File
@@ -153,6 +153,7 @@ def print_text(content=None):
del be del be
except Exception as e: except Exception as e:
return_dict['message'] = str(e) return_dict['message'] = str(e)
logger.warning('Exception happened: %s', e)
response.status = 500 response.status = 500
return return_dict return return_dict
@@ -198,7 +199,7 @@ def main():
sys.stderr.write('Could not find any of the default fonts') sys.stderr.write('Could not find any of the default fonts')
sys.exit() sys.exit()
run(host='localhost', port=args.port, debug=args.loglevel==logging.DEBUG) run(host='', port=args.port, debug=args.loglevel==logging.DEBUG)
if __name__ == "__main__": if __name__ == "__main__":
main() main()