Removed unnecessary if statement in createsuperuser command.

This commit is contained in:
Tim Graham 2015-07-31 07:48:03 -04:00
parent 98eb91171d
commit 264eeaf14a
1 changed files with 7 additions and 7 deletions

View File

@ -125,13 +125,13 @@ class Command(BaseCommand):
# Get a password # Get a password
while password is None: while password is None:
if not password: password = getpass.getpass()
password = getpass.getpass() password2 = getpass.getpass(force_str('Password (again): '))
password2 = getpass.getpass(force_str('Password (again): ')) if password != password2:
if password != password2: self.stderr.write("Error: Your passwords didn't match.")
self.stderr.write("Error: Your passwords didn't match.") password = None
password = None continue
continue
if password.strip() == '': if password.strip() == '':
self.stderr.write("Error: Blank passwords aren't allowed.") self.stderr.write("Error: Blank passwords aren't allowed.")
password = None password = None