1
0
Fork 0
mirror of https://github.com/sileht/bird-lg.git synced 2024-11-22 15:04:41 +01:00

Fix error when sanitized have only 1 argument

This commit is contained in:
Mehdi Abaakouk 2012-10-17 11:31:15 +02:00
parent 8419152668
commit c22e73c7f8

6
lg.py Executable file → Normal file
View file

@ -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 return render_template('error.html', warning="The requested URL was not found on the server."), 404
def sanitized(*args): 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/<query>") @app.route("/whois/<query>")
def whois(query): def whois(query):