Skip to content

Commit

Permalink
ValueError added to decfun
Browse files Browse the repository at this point in the history
  • Loading branch information
mishelly-h committed Jan 17, 2024
1 parent 189f9d3 commit ebbeba6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/passwordler/decrypt_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def decrypt_password(encrypted_message, random_seed = 123):
f"integer expected as random_seed, got '{type(random_seed)}'"
)

if encrypted_message == '':
raise ValueError(
'encrypted_message cannot be empty string')

random.seed(random_seed)

original = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q',
Expand Down

0 comments on commit ebbeba6

Please sign in to comment.