Skip to content

Commit

Permalink
Now catching ImportError instead of KeyError
Browse files Browse the repository at this point in the history
KeyError is if environ access fails.
  • Loading branch information
c-simpson committed May 4, 2021
1 parent 4136810 commit 2e74f25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

try:
from secrets import BASEUSER_PW, BASEADMIN_PW
except KeyError:
except ImportError:
BASEUSER_PW = os.environ['BASEUSER_PW']
BASEADMIN_PW = os.environ['BASEADMIN_PW']

Expand Down

0 comments on commit 2e74f25

Please sign in to comment.