diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-13 18:22:23 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-13 18:23:26 +0200 |
| commit | 0dac73ebd733d9140476b66b81afa56c5b0f65b2 (patch) | |
| tree | 7a08077ca64c40e25e18fce1cf3b2a9cb10e1bfe | |
| parent | d2975718fe0585cad1ed1462cc4d65373a6c7bb0 (diff) | |
Removed binary flag to open files for writing text content
| -rw-r--r-- | django/core/management/commands/makemessages.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index d8e8f6cff7..fc0a78fb2b 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -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: |
