use WTTR_WWO_KEY_FILE to override WWO keyfile location (#238)

pull/456/head
Igor Chubin 5 years ago
parent bac771051a
commit fbf4aad445

@ -88,7 +88,9 @@ IP2LOCATION_KEY = None
if os.path.exists(_IP2LOCATION_KEY_FILE):
IP2LOCATION_KEY = open(_IP2LOCATION_KEY_FILE, 'r').read().strip()
_WWO_KEY_FILE = os.environ['HOME'] + '/.wwo.key'
_WWO_KEY_FILE = os.environ.get(
"WTTR_WWO_KEY_FILE",
os.environ['HOME'] + '/.wwo.key')
WWO_KEY = "key-is-not-specified"
if os.path.exists(_WWO_KEY_FILE):
WWO_KEY = open(_WWO_KEY_FILE, 'r').read().strip()

Loading…
Cancel
Save