mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 12:08:47 +00:00
use WTTR_WWO_KEY_FILE to override WWO keyfile location (#238)
This commit is contained in:
parent
bac771051a
commit
fbf4aad445
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue