From 757baad76a6eb679f958b11edbf536df1b4626ff Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 27 Dec 2015 09:52:50 +0200 Subject: [PATCH] added favicon.ico --- bin/srv.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/srv.py b/bin/srv.py index 217bb5e..357753f 100644 --- a/bin/srv.py +++ b/bin/srv.py @@ -44,6 +44,8 @@ so we have brought you to Oymyakon, one of the coldest permanently inhabited locales on the planet. """ +if not os.path.exists(os.path.dirname( LOG_FILE )): + os.makedirs( os.path.dirname( LOG_FILE ) ) logging.basicConfig(filename=LOG_FILE, level=logging.DEBUG) reader = geoip2.database.Reader(GEOLITE) @@ -211,10 +213,12 @@ def show_help(): @app.route('/files/') def send_static(path): - print path - print STATIC return send_from_directory(STATIC, path) +@app.route('/favicon.ico') +def send_favicon(): + return send_from_directory(STATIC, 'favicon.ico') + @app.route("/") @app.route("/") def wttr(location = None):