new global variables

This commit is contained in:
Igor Chubin 2018-10-05 20:19:27 +02:00
parent e414e8f924
commit fcc7b79272

View file

@ -3,7 +3,7 @@ import os
MYDIR = os.path.abspath(os.path.dirname( os.path.dirname('__file__') )) MYDIR = os.path.abspath(os.path.dirname( os.path.dirname('__file__') ))
GEOLITE = os.path.join( MYDIR, "GeoLite2-City.mmdb" ) GEOLITE = os.path.join(MYDIR, 'data', "GeoLite2-City.mmdb")
WEGO = "/home/igor/go/bin/we-lang" WEGO = "/home/igor/go/bin/we-lang"
PYPHOON = "/home/igor/wttr.in/pyphoon/bin/pyphoon-lolcat" PYPHOON = "/home/igor/wttr.in/pyphoon/bin/pyphoon-lolcat"
@ -33,6 +33,18 @@ MALFORMED_RESPONSE_HTML_PAGE = open(os.path.join(STATIC, 'malformed-response.htm
LISTEN_HOST = "" LISTEN_HOST = ""
LISTEN_PORT = 8002 LISTEN_PORT = 8002
PLAIN_TEXT_AGENTS = [
"curl",
"httpie",
"lwp-request",
"wget",
"python-requests"
]
PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation']
IP2LOCATION_KEY = ''
def error(text): def error(text):
if not text.startswith('Too many queries'): if not text.startswith('Too many queries'):
print text print text