Closed file after reading pot file

Faulty line was introduced in 50a8ab7cd1.
This commit is contained in:
Claude Paroz 2013-11-30 11:30:56 +01:00
parent 50a8ab7cd1
commit 6310d658b7
1 changed files with 2 additions and 1 deletions

View File

@ -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(