Skip to content

Commit 58c6868

Browse files
committed
Write bytes to fobj if we open it in 'wb' mode
1 parent cd110b1 commit 58c6868

File tree

1 file changed

+2
-2
lines changed
  • django_babel/management/commands

1 file changed

+2
-2
lines changed

django_babel/management/commands/babel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def handle_makemessages(self, **options):
6464

6565
if not os.path.exists(potfile):
6666
with open(potfile, 'wb') as fobj:
67-
fobj.write('')
67+
fobj.write(b'')
6868

6969
cmd = ['pybabel', 'extract', '-o', potfile]
7070

@@ -87,7 +87,7 @@ def handle_makemessages(self, **options):
8787

8888
if not os.path.exists(pofile):
8989
with open(pofile, 'wb') as fobj:
90-
fobj.write('')
90+
fobj.write(b'')
9191

9292
cmd = ['pybabel', 'update', '-D', domain,
9393
'-i', potfile,

0 commit comments

Comments
 (0)