Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: various exception/failure path undefineds #14

Merged
merged 4 commits into from
Sep 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def convert_pvc_to_simpler_dict(pvc):
try:
if 'volume.autoscaler.kubernetes.io/scale-up-percent' in pvc.metadata.annotations:
return_dict['scale_up_percent'] = int(pvc.metadata.annotations['volume.autoscaler.kubernetes.io/scale-up-percent'])
except:
except Exception as e:
print("Could not convert scale_up_percent to int: {}".format(e))

try:
Expand All @@ -349,7 +349,7 @@ def convert_pvc_to_simpler_dict(pvc):
try:
if 'volume.autoscaler.kubernetes.io/scale-up-max-size' in pvc.metadata.annotations:
return_dict['scale_up_max_size'] = int(pvc.metadata.annotations['volume.autoscaler.kubernetes.io/scale-up-max-size'])
except:
except Exception as e:
print("Could not convert scale_up_max_size to int: {}".format(e))

try:
Expand Down