We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6228775 commit c79ae63Copy full SHA for c79ae63
unfoldedcircle/cli.py
@@ -27,11 +27,14 @@ def __init__(self, keyfile):
27
28
def read_keyfile(self):
29
apikeys = dict()
30
- with open(self.keyfile, "r") as f:
31
- for line in f:
32
- endpoint, apikey = line.split(";")
33
- apikey = apikey.strip()
34
- apikeys[endpoint] = apikey
+ try:
+ with open(self.keyfile, "r") as f:
+ for line in f:
+ endpoint, apikey = line.split(";")
+ apikey = apikey.strip()
35
+ apikeys[endpoint] = apikey
36
+ except FileNotFoundError:
37
+ apikeys = dict()
38
self.apikeys = apikeys
39
return apikeys
40
0 commit comments