From 5ef15bdbbf3d22f9e2bbadee13708d489dffd759 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 28 Sep 2019 15:36:13 -0400 Subject: Add nfsw/util.py --- nfsw/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 nfsw/util.py diff --git a/nfsw/util.py b/nfsw/util.py new file mode 100644 index 0000000..3536dfc --- /dev/null +++ b/nfsw/util.py @@ -0,0 +1,9 @@ +import os + +from flask import current_app + +def read_junk(key): + r = os.path.join('junk', key) + + with current_app.open_resource(r) as f: + return f.read().decode() -- cgit v1.2.3