From c22e73c7f83672a6e578c418c25d54eb1d66ea51 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 17 Oct 2012 11:31:15 +0200 Subject: [PATCH] Fix error when sanitized have only 1 argument --- lg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100755 => 100644 lg.py diff --git a/lg.py b/lg.py old mode 100755 new mode 100644 index 86f0804..1d30949 --- a/lg.py +++ b/lg.py @@ -181,7 +181,11 @@ def page_not_found(e): return render_template('error.html', warning="The requested URL was not found on the server."), 404 def sanitized(*args): - return tuple( unescape(s) for s in args) + res = tuple( unescape(s) for s in args) + if len(args) == 1: + return res[1] + else: + return res @app.route("/whois/") def whois(query):