diff --git a/lib/globals.py b/lib/globals.py index b8f25de..a97c4af 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -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()