diff options
author | Cédric Picard <cedric.picard@efrei.net> | 2014-11-28 20:26:12 +0100 |
---|---|---|
committer | Cédric Picard <cedric.picard@efrei.net> | 2014-11-28 20:26:12 +0100 |
commit | fc9f8632da09763b54e25861dc6e1798091d0bba (patch) | |
tree | 2d69c7553d9a8fc4020fc16c9d795e7a0de46def /pasteme.py | |
parent | 1b76a20a35bb3b0644a63d8c8c61a588788627b9 (diff) | |
download | pasteme-fc9f8632da09763b54e25861dc6e1798091d0bba.tar.gz pasteme-fc9f8632da09763b54e25861dc6e1798091d0bba.tar.bz2 pasteme-fc9f8632da09763b54e25861dc6e1798091d0bba.zip |
Changed from internal error to bad request error
Diffstat (limited to 'pasteme.py')
-rwxr-xr-x | pasteme.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -25,10 +25,10 @@ def route_paste_post(): pid = identigen.generate(content) except AttributeError as e: print(e) - bottle.abort(500) + bottle.abort(400) path = pathbase / pid with path.open(mode='wb') as fd: - fd.write(content.encode('utf8')) + fd.write(content.encode('utf8')) bottle.redirect('/' + pid) @bottle.route('/static/<path:path>') @@ -60,9 +60,9 @@ def route_paste_get(pid, pformat='colored'): def error404(error): return bottle.template("not_found") -@bottle.error(500) -def error500(error): - return bottle.template("internal_error") +@bottle.error(400) +def error400(error): + return bottle.template("bad_request") if __name__ == '__main__': print('I: Starting application with development server') |