diff --git a/abst/__version__.py b/abst/__version__.py index 2f2538e..3cbbe73 100644 --- a/abst/__version__.py +++ b/abst/__version__.py @@ -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" diff --git a/abst/bastion_support/oci_bastion.py b/abst/bastion_support/oci_bastion.py index 4014fdb..b2e8245 100644 --- a/abst/bastion_support/oci_bastion.py +++ b/abst/bastion_support/oci_bastion.py @@ -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():