Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed binary flag to open files for writing text content

  • Loading branch information...
commit 0dac73ebd733d9140476b66b81afa56c5b0f65b2 1 parent d297571
Claude Paroz claudep authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/management/commands/makemessages.py
4 django/core/management/commands/makemessages.py
View
@@ -144,7 +144,7 @@ def write_pot_file(potfile, msgs, file, work_file, is_templatized):
msgs = '\n'.join(dropwhile(len, msgs.split('\n')))
else:
msgs = msgs.replace('charset=CHARSET', 'charset=UTF-8')
- with open(potfile, 'ab') as fp:
+ with open(potfile, 'a') as fp:
fp.write(msgs)
def process_file(file, dirpath, potfile, domain, verbosity,
@@ -252,7 +252,7 @@ def write_po_file(pofile, potfile, domain, locale, verbosity, stdout,
msgs = copy_plural_forms(msgs, locale, domain, verbosity, stdout)
msgs = msgs.replace(
"#. #-#-#-#-# %s.pot (PACKAGE VERSION) #-#-#-#-#\n" % domain, "")
- with open(pofile, 'wb') as fp:
+ with open(pofile, 'w') as fp:
fp.write(msgs)
os.unlink(potfile)
if no_obsolete:
Please sign in to comment.
Something went wrong with that request. Please try again.