Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Commit

Permalink
Translation patch for executing commands from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gugu committed Sep 24, 2012
1 parent bd514f2 commit 05b1696
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django/core/management/base.py
Expand Up @@ -247,8 +247,9 @@ def execute(self, *args, **options):
else:
self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
sys.exit(1)
if saved_lang is not None:
translation.activate(saved_lang)
finally:
if saved_lang is not None:
translation.activate(saved_lang)

def validate(self, app=None, display_num_errors=False):
"""
Expand Down

0 comments on commit 05b1696

Please sign in to comment.