Skip to content

Commit

Permalink
fix(storage): use .get() to access encrypted field
Browse files Browse the repository at this point in the history
  • Loading branch information
villevsv-upcloud committed May 20, 2024
1 parent 7dc4c08 commit 82e4d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upcloud_api/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _reset(self, **kwargs) -> None:
elif 'storage_size' in kwargs:
self.size = kwargs['storage_size']

if 'encrypted' in kwargs and kwargs['encrypted'] == 'yes':
if kwargs.get('encrypted') == 'yes':
self.encrypted = True
else:
self.encrypted = False
Expand Down

0 comments on commit 82e4d51

Please sign in to comment.