Skip to content

Commit

Permalink
logging and version enforce
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Otoupal committed Mar 7, 2024
1 parent 1ac71a8 commit 638e044
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
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.32"
__version__ = "2.3.34"
__author__ = "Jiri Otoupal"
__author_email__ = "jiri-otoupal@ips-database.eu"
__license__ = "MIT"
Expand Down
11 changes: 6 additions & 5 deletions abst/bastion_support/oci_bastion.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,9 @@ def load_response(self, res):
try:
self.response = response = Bastion.parse_response(res)
logging.debug(f"Server Response: {response}")
except JSONDecodeError:
except JSONDecodeError as e:
rich.print(f"Failed to decode json: {res}")
logging.error(f"Exception {e}")
bid = response.get("id", None)

return bid, response
Expand All @@ -326,8 +327,8 @@ def create_bastion_forward_port_session(self, creds):
Bastion.session_list.append(trs["id"])
Bastion.session_desc[trs["id"]] = creds.get("region", None)
logging.debug(f"Added session id of {self.context_name}")
except:
pass
except Exception as e:
logging.error(f"Exception {e}")
return creds["host"], creds["target-ip"], creds["target-port"], ssh_pub_path, res

@classmethod
Expand Down Expand Up @@ -368,8 +369,8 @@ def create_bastion_ssh_session_managed(self, creds):
Bastion.session_list.append(trs["id"])
Bastion.session_desc[trs["id"]] = creds.get("region", None)
logging.debug(f"Added session id of {self.context_name}")
except:
pass
except Exception as e:
logging.error(f"Exception {e}")
return res
except KeyError as ex:
rich.print(f"Missing filled out parameter for '{self.get_print_name()}' {ex}")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inquirerpy~=0.3.4
rich~=12.6.0
abst~=1.7.9
lastversion~=2.4.8
oci~=2.90.0
oci~=3.36.0
setuptools~=60.2.0
semantic-version~=2.10.0
pyperclip~=1.8.2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
packages=find_packages(),
include_package_data=True,
python_requires=">=3.7,<4",
install_requires=["click", "rich", "inquirerpy", "oci", "lastversion",
install_requires=["click", "rich", "inquirerpy", "oci==3.36.0", "lastversion",
"semantic_version", "pyperclip",
"bext"],
extras_require={
Expand Down

0 comments on commit 638e044

Please sign in to comment.