Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Closed file after reading pot file

Faulty line was introduced in 50a8ab7.
  • Loading branch information...
commit 6310d658b7c8a39747a8cda3e3b8716266cffb0d 1 parent 50a8ab7
@claudep claudep authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/core/management/commands/makemessages.py
View
3  django/core/management/commands/makemessages.py
@@ -402,7 +402,8 @@ def write_po_file(self, potfile, locale):
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(
Please sign in to comment.
Something went wrong with that request. Please try again.