diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2025-04-29 20:28:44 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-04-29 20:28:44 +0100 |
commit | 2159e47e287920c1a89188ba789329344e952034 (patch) | |
tree | 1678a24019c9f2b7ee193d97a0f4a11e743af565 /edaweb/app.py | |
parent | 0e8ada1eff8799437c9be1bc2af10d6198fa8cad (diff) | |
download | eda.gay-2159e47e287920c1a89188ba789329344e952034.tar.gz eda.gay-2159e47e287920c1a89188ba789329344e952034.zip |
Various bug fixes
Diffstat (limited to 'edaweb/app.py')
-rw-r--r-- | edaweb/app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/edaweb/app.py b/edaweb/app.py index 6902fe4..436df7a 100644 --- a/edaweb/app.py +++ b/edaweb/app.py @@ -17,7 +17,7 @@ import io app = flask.Flask(__name__) CONFIG = configparser.ConfigParser(interpolation = None) -CONFIG.read("edaweb.conf") +CONFIG.read(os.path.join(os.path.dirname(__file__), "edaweb.conf")) shown_images = set() shown_sidebar_images = set() @@ -224,7 +224,7 @@ def serve_random(): sbi = services.get_random_image(tags) req = urllib.request.Request(sbi.imurl) mediaContent = urllib.request.urlopen(req).read() - with open(os.path.join("static", "images", "random.jpg"), "wb") as f: + with open(os.path.join(os.path.dirname(__file__), "static", "images", "random.jpg"), "wb") as f: f.write(mediaContent) with database.Database() as db: |