diff --git a/django/contrib/auth/tests/forms.py b/django/contrib/auth/tests/forms.py
index 2bacc8e..b65f3fc 100644
a
|
b
|
class PasswordResetFormTest(TestCase):
|
303 | 303 | form = PasswordResetForm(data) |
304 | 304 | self.assertFalse(form.is_valid()) |
305 | 305 | self.assertEqual(form["email"].errors, |
306 | | [u"The user account associated with this e-mail address cannot reset the password."]) |
| 306 | [PasswordResetForm.error_messages['unusable']]) |
diff --git a/django/core/management/base.py b/django/core/management/base.py
index db855e1..a9fc38c 100644
a
|
b
|
class BaseCommand(object):
|
247 | 247 | else: |
248 | 248 | self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e))) |
249 | 249 | sys.exit(1) |
250 | | if saved_lang is not None: |
251 | | translation.activate(saved_lang) |
| 250 | finally: |
| 251 | if saved_lang is not None: |
| 252 | translation.activate(saved_lang) |
252 | 253 | |
253 | 254 | def validate(self, app=None, display_num_errors=False): |
254 | 255 | """ |