From ecc4b1014e126062a5be88142b81500db1dcfad7 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Fri, 9 Dec 2016 21:00:04 +0100 Subject: add debug flag to web application --- watchnews-cli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/watchnews-cli b/watchnews-cli index df41706..f3c080a 100755 --- a/watchnews-cli +++ b/watchnews-cli @@ -23,6 +23,8 @@ if __name__ == '__main__': help='List all registered feeds') parser.add_argument('--web', action='store_true', help='Run web interface') + parser.add_argument('--web-debug', action='store_true', + help='Run web interface in debug mode') parser.add_argument('--db', metavar='DBPATH', default=os.path.join(os.path.dirname(__file__), 'db.sqlite'), help='Path to sqlite database file') @@ -55,7 +57,7 @@ if __name__ == '__main__': print('{0.id} - {1} - {0.title} - {0.url}'.format( feed, feed.created_date.strftime('%x %X'))) if args.web: - web.get_app().run() + web.get_app().run(debug=args.web_debug) if args.rss: print(rss.rss()) -- cgit v1.2.1