Skip to content

Commit

Permalink
Fix #547
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarijo committed Jan 16, 2023
1 parent 02e7c66 commit fb7e26e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/somef/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = "0.9.1"
__version__ = "0.9.3"
24 changes: 12 additions & 12 deletions src/somef/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ def configure(authorization="",
).expanduser()
os.makedirs(str(credentials_file.parent), exist_ok=True)

if credentials_file.exists():
with credentials_file.open("r") as fh:
data = json.load(fh)
else:
data = {
constants.CONF_AUTHORIZATION: "token " + authorization,
constants.CONF_DESCRIPTION: description,
constants.CONF_INVOCATION: invocation,
constants.CONF_INSTALLATION: installation,
constants.CONF_CITATION: citation,
constants.CONF_BASE_URI: base_uri
}
# if credentials_file.exists():
# with credentials_file.open("r") as fh:
# data = json.load(fh)
# else:
data = {
constants.CONF_AUTHORIZATION: "token " + authorization,
constants.CONF_DESCRIPTION: description,
constants.CONF_INVOCATION: invocation,
constants.CONF_INSTALLATION: installation,
constants.CONF_CITATION: citation,
constants.CONF_BASE_URI: base_uri
}

if data[constants.CONF_AUTHORIZATION] == "token ":
del data[constants.CONF_AUTHORIZATION]
Expand Down

0 comments on commit fb7e26e

Please sign in to comment.