Commit 8c54d7cf authored by Claude Paroz's avatar Claude Paroz
Browse files

Fixed #17947 -- Fixed language restore after management command even when...

Fixed #17947 -- Fixed language restore after management command even when exceptions occur. Thanks andrey@kostenko.name for the report and the patch. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 782c1a77
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ class BaseCommand(object):
            else:
                self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
            sys.exit(1)
        finally:
            if saved_lang is not None:
                translation.activate(saved_lang)