summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-11-30 11:30:56 +0100
committerClaude Paroz <claude@2xlibre.net>2013-11-30 11:31:17 +0100
commit6310d658b7c8a39747a8cda3e3b8716266cffb0d (patch)
treef70b0e14e45a02a7afe1d8ee84cb862464963f56
parent50a8ab7cd1e611e6422a148becaec02218577d67 (diff)
Closed file after reading pot file
Faulty line was introduced in 50a8ab7cd1.
-rw-r--r--django/core/management/commands/makemessages.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index 4994aaf6ba..a42ba96444 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -402,7 +402,8 @@ class Command(NoArgsCommand):
elif self.verbosity > 0:
self.stdout.write(errors)
else:
- msgs = open(potfile, 'r').read()
+ with open(potfile, 'r') as fp:
+ msgs = fp.read()
if not self.invoked_for_django:
msgs = self.copy_plural_forms(msgs, locale)
msgs = msgs.replace(