diff options
-rw-r--r-- | nfsw/util.py | 9 |
1 files changed, 9 insertions, 0 deletions
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() |