Skip to content

Commit

Permalink
fixed init error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Otoupal committed Dec 19, 2023
1 parent 0ca2385 commit c544e89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion abst/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"CLI Command making OCI Bastion and kubernetes usage simple and fast"
)

__version__ = "2.3.14"
__version__ = "2.3.15"
__author__ = "Jiri Otoupal"
__author_email__ = "jiri-otoupal@ips-database.eu"
__license__ = "MIT"
Expand Down
5 changes: 5 additions & 0 deletions abst/bastion_support/oci_bastion.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ def load_config(cls):

@classmethod
def load_json(cls, path=default_creds_path) -> dict:
if not default_conf_path.exists() and path == default_conf_path:
default_conf_path.parent.mkdir(exist_ok=True)
with open(str(path), "w") as f:
json.dump({"last-check": datetime.datetime.timestamp(datetime.datetime.now())}, f, indent=3)

with open(str(path), "r") as f:
creds = json.load(f)
if "delete_this" in creds.keys():
Expand Down

0 comments on commit c544e89

Please sign in to comment.