1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

Merge pull request #54 from md2perpe/simplify-logic

Simplify logic
This commit is contained in:
Igor Chubin
2018-07-14 01:06:29 +02:00
committed by GitHub
+1 -3
View File
@@ -49,9 +49,7 @@ def is_html_needed(user_agent):
Basing on `user_agent`, return whether it needs HTML or ANSI
"""
plaintext_clients = ['curl', 'wget', 'fetch', 'httpie', 'lwp-request', 'python-requests']
if any([x in user_agent for x in plaintext_clients]):
return False
return True
return all([x not in user_agent for x in plaintext_clients])
@app.route('/files/<path:path>')
def send_static(path):