added 'b' modifier to popen3 calls in make-messages.py to help getting it to run with windows

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-12-03 19:04:31 +00:00
parent 027c47b9b4
commit 90ff261fbc
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ for lang in languages:
if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
cmd = 'xgettext %s -d %s -L Python --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy -o - "%s"' % ( cmd = 'xgettext %s -d %s -L Python --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy -o - "%s"' % (
os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile)) os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile))
(stdin, stdout, stderr) = os.popen3(cmd, 'r') (stdin, stdout, stderr) = os.popen3(cmd, 'rb')
msgs = stdout.read() msgs = stdout.read()
errors = stderr.read() errors = stderr.read()
if errors: if errors:
@ -91,7 +91,7 @@ for lang in languages:
if thefile != file: if thefile != file:
os.unlink(os.path.join(dirpath, thefile)) os.unlink(os.path.join(dirpath, thefile))
(stdin, stdout, stderr) = os.popen3('msguniq %s' % potfile, 'r') (stdin, stdout, stderr) = os.popen3('msguniq %s' % potfile, 'rb')
msgs = stdout.read() msgs = stdout.read()
errors = stderr.read() errors = stderr.read()
if errors: if errors:
@ -100,7 +100,7 @@ for lang in languages:
sys.exit(8) sys.exit(8)
open(potfile, 'w').write(msgs) open(potfile, 'w').write(msgs)
if os.path.exists(pofile): if os.path.exists(pofile):
(stdin, stdout, stderr) = os.popen3('msgmerge -q %s %s' % (pofile, potfile), 'r') (stdin, stdout, stderr) = os.popen3('msgmerge -q %s %s' % (pofile, potfile), 'rb')
msgs = stdout.read() msgs = stdout.read()
errors = stderr.read() errors = stderr.read()
if errors: if errors: