summaryrefslogtreecommitdiff
path: root/watchnews-cli
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-12-09 21:00:04 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-12-09 21:00:04 +0100
commitecc4b1014e126062a5be88142b81500db1dcfad7 (patch)
tree02e1b591060d536d421d834b76cb8d70ba717db3 /watchnews-cli
parent0d3a67d72dac49a17e8554a02f4763ae7c753c4f (diff)
downloadwatchnews-ecc4b1014e126062a5be88142b81500db1dcfad7.tar.gz
watchnews-ecc4b1014e126062a5be88142b81500db1dcfad7.zip
add debug flag to web application
Diffstat (limited to 'watchnews-cli')
-rwxr-xr-xwatchnews-cli4
1 files changed, 3 insertions, 1 deletions
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())