- commit
- 76516f7619801aa2caa63e1fe242d6bfde750b34
- parent
- 56ea5ac9873aa5eeaa51bbb80b0b90edc8c58e8d
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2014-09-26 01:52
fix relative paths
Diffstat
| M | plutopluto.py | 5 | +++-- |
1 files changed, 3 insertions, 2 deletions
diff --git a/plutopluto.py b/plutopluto.py
@@ -1,6 +1,7 @@ 1 1 #!/usr/bin/env python 2 2 3 3 import sys -1 4 import os 4 5 from time import mktime, time 5 6 import argparse 6 7 @@ -83,7 +84,7 @@ def main(): 83 84 84 85 @app.route('/', methods=['GET']) 85 86 def index():86 -1 with open('index.html') as fh:-1 87 with open(os.path.join(app.root_path, 'index.html')) as fh: 87 88 html = fh.read() 88 89 89 90 return html @@ -105,7 +106,7 @@ if __name__ == '__main__': 105 106 args = parser.parse_args() 106 107 107 108 if args.config:108 -1 app.config.from_pyfile(args.config)-1 109 app.config.from_pyfile(os.path.abspath(args.config)) 109 110 app.debug = args.debug 110 111 app.config['URLS'] = args.urls + app.config.get('URLS', []) 111 112