Skip to content
Browse files

Closed file after reading pot file

Faulty line was introduced in 50a8ab7.
  • Loading branch information...
1 parent 50a8ab7 commit 6310d658b7c8a39747a8cda3e3b8716266cffb0d @claudep claudep committed
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(

0 comments on commit 6310d65

Please sign in to comment.
Something went wrong with that request. Please try again.