Skip to content

Commit 2ca79c8

Browse files
committed
Move return outside of finally block
1 parent db25987 commit 2ca79c8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/envstack/encrypt.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ def encrypt(self, data: str):
121121
log.error("invalid value: %s", e)
122122
except Exception as e:
123123
log.error("unhandled error: %s", e)
124-
finally:
125-
return results
124+
return results
126125

127126
def decrypt(self, data: str):
128127
"""Decrypt a secret using Fernet.
@@ -224,8 +223,7 @@ def encrypt(self, data: str):
224223
log.error("invalid value: %s", e)
225224
except Exception as e:
226225
log.error("unhandled error: %s", e)
227-
finally:
228-
return results
226+
return results
229227

230228
def decrypt(self, data: str):
231229
"""Convenience function to decrypt a secret using AES-GCM.

0 commit comments

Comments
 (0)