mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-22 06:54:43 +01:00
Fix error when sanitized have only 1 argument
This commit is contained in:
parent
8419152668
commit
c22e73c7f8
6
lg.py
Executable file → Normal file
6
lg.py
Executable file → Normal 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
|
||||
|
||||
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>")
|
||||
def whois(query):
|
||||
|
|
Loading…
Reference in a new issue