use WTTR_IP2LOCATION_KEY_FILE ot override ip2location key location
This commit is contained in:
parent
fbf4aad445
commit
64322d7b61
1 changed files with 3 additions and 1 deletions
|
|
@ -83,7 +83,9 @@ PLAIN_TEXT_AGENTS = [
|
|||
|
||||
PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation', ':iterm2']
|
||||
|
||||
_IP2LOCATION_KEY_FILE = os.environ['HOME'] + '/.ip2location.key'
|
||||
_IP2LOCATION_KEY_FILE = os.environ.get(
|
||||
"WTTR_IP2LOCATION_KEY_FILE",
|
||||
os.environ['HOME'] + '/.ip2location.key')
|
||||
IP2LOCATION_KEY = None
|
||||
if os.path.exists(_IP2LOCATION_KEY_FILE):
|
||||
IP2LOCATION_KEY = open(_IP2LOCATION_KEY_FILE, 'r').read().strip()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue