diff options
author | rsiddharth <s@ricketyspace.net> | 2019-09-28 15:36:13 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-09-28 15:36:13 -0400 |
commit | 5ef15bdbbf3d22f9e2bbadee13708d489dffd759 (patch) | |
tree | 78932616a80461641a945365934ea73378800479 | |
parent | ad5145fe3a4a52976fa965bfd4dc57f957d55161 (diff) |
Add nfsw/util.py
-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() |