aboutsummaryrefslogtreecommitdiffstats
path: root/pasteme.py
diff options
context:
space:
mode:
Diffstat (limited to 'pasteme.py')
-rwxr-xr-xpasteme.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/pasteme.py b/pasteme.py
index 09b3351..fae3922 100755
--- a/pasteme.py
+++ b/pasteme.py
@@ -21,13 +21,8 @@ def route_root():
@bottle.route('/', method='POST')
def route_paste_post():
- content = bottle.request.forms.getunicode('content', '')
-
- try:
- pid = identigen.generate(content)
- except AttributeError as e:
- print(e)
- bottle.abort(400)
+ content = bottle.request.forms.getunicode('content', '') or ''
+ pid = identigen.generate(content)
path = pathbase / pid
with path.open(mode='wb') as fd:
fd.write(content.encode('utf8'))