aboutsummaryrefslogtreecommitdiffstats
path: root/pasteme.py
diff options
context:
space:
mode:
authorVG <vg@devys.org>2014-11-29 16:30:06 +0100
committerVG <vg@devys.org>2014-11-29 16:30:06 +0100
commit953309ddde4477adfafd0e74d0fca074eeb63607 (patch)
treef29cbb0b8fb21deb89bedbff1cb599483b86ee3b /pasteme.py
parent4475362294e6c8fd0df4f19c035bed81e595671c (diff)
downloadpasteme-953309ddde4477adfafd0e74d0fca074eeb63607.tar.gz
pasteme-953309ddde4477adfafd0e74d0fca074eeb63607.tar.bz2
pasteme-953309ddde4477adfafd0e74d0fca074eeb63607.zip
fix alignment pb on floating menu and add cosmetic changes
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'))