Skip to content

Commit

Permalink
Use snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-w committed Jan 18, 2021
1 parent 183693c commit 23e1a2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/vorta/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,16 @@ def is_system_tray_available():
return is_available


def validate_passwords(firstPass, secondPass):
''' Validates the password for borg '''
passEqual = firstPass == secondPass
passLong = len(firstPass) > 8
def validate_passwords(first_pass, second_pass):
''' Validates the password for borg, do not use on single fields '''
pass_equal = first_pass == second_pass
pass_long = len(first_pass) > 8

if not passLong and not passEqual:
if not pass_long and not pass_equal:
return trans_late('utils', "Passwords must be identical and greater than 8 characters long.")
if not passEqual:
if not pass_equal:
return trans_late('utils', "Passwords must be identical.")
if not passLong:
if not pass_long:
return trans_late('utils', "Passwords must be greater than 8 characters long.")

return ""
Expand Down

0 comments on commit 23e1a2a

Please sign in to comment.