Fix error reporting for getenv_in

This commit is contained in:
Lauri Võsandi 2021-06-09 22:33:45 +03:00
parent 4f47262a4c
commit ba530b5cd0

View File

@ -64,7 +64,7 @@ except ValueError: # If FQDN is not configured
def getenv_in(key, default, *vals):
val = os.getenv(key, default)
if val not in (default,) + vals:
raise ValueError("Got %s for %s, expected one of %s" % (repr(val), key, vals))
raise ValueError("Got %s for %s, expected one of %s" % (repr(val), key, (default,) + vals))
return val