diff options
| author | Tim Graham <timograham@gmail.com> | 2015-07-31 07:48:03 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-01 20:00:05 -0400 |
| commit | 264eeaf14adf979a81439c6d1f6a8a53b088885e (patch) | |
| tree | e75ef83de6ad5a6a8e47544a4fb3b26b1807b1e6 | |
| parent | 98eb91171d7bb97327c714ef8e816103555573e6 (diff) | |
Removed unnecessary if statement in createsuperuser command.
| -rw-r--r-- | django/contrib/auth/management/commands/createsuperuser.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py index 1e3b9a8d7c..ae6ea0e48a 100644 --- a/django/contrib/auth/management/commands/createsuperuser.py +++ b/django/contrib/auth/management/commands/createsuperuser.py @@ -125,13 +125,13 @@ class Command(BaseCommand): # Get a password while password is None: - if not password: - password = getpass.getpass() - password2 = getpass.getpass(force_str('Password (again): ')) - if password != password2: - self.stderr.write("Error: Your passwords didn't match.") - password = None - continue + password = getpass.getpass() + password2 = getpass.getpass(force_str('Password (again): ')) + if password != password2: + self.stderr.write("Error: Your passwords didn't match.") + password = None + continue + if password.strip() == '': self.stderr.write("Error: Blank passwords aren't allowed.") password = None |
