Skip to content

Commit

Permalink
Merge pull request #549 from KnowledgeCaptureAndDiscovery/dev
Browse files Browse the repository at this point in the history
Fix #547
  • Loading branch information
dgarijo authored Jan 16, 2023
2 parents dad7822 + fb7e26e commit f5df84e
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 f5df84e

Please sign in to comment.