comparison babel/messages/frontend.py @ 280:1f705a64f58f stable-0.9.x

Ported [307] to 0.9.x branch.
author cmlenz
date Wed, 05 Sep 2007 16:33:22 +0000
parents 23e60ca937ca
children b6efe6a8e2ec
comparison
equal deleted inserted replaced
278:2172100ee1d5 280:1f705a64f58f
160 log.error('error: %s:%d: %s', po_file, message.lineno, 160 log.error('error: %s:%d: %s', po_file, message.lineno,
161 error) 161 error)
162 162
163 log.info('compiling catalog %r to %r', po_file, mo_file) 163 log.info('compiling catalog %r to %r', po_file, mo_file)
164 164
165 outfile = open(mo_file, 'w') 165 outfile = open(mo_file, 'wb')
166 try: 166 try:
167 write_mo(outfile, catalog, use_fuzzy=self.use_fuzzy) 167 write_mo(outfile, catalog, use_fuzzy=self.use_fuzzy)
168 finally: 168 finally:
169 outfile.close() 169 outfile.close()
170 170
750 self.log.error('error: %s:%d: %s', po_file, message.lineno, 750 self.log.error('error: %s:%d: %s', po_file, message.lineno,
751 error) 751 error)
752 752
753 self.log.info('compiling catalog %r to %r', po_file, mo_file) 753 self.log.info('compiling catalog %r to %r', po_file, mo_file)
754 754
755 outfile = open(mo_file, 'w') 755 outfile = open(mo_file, 'wb')
756 try: 756 try:
757 write_mo(outfile, catalog, use_fuzzy=options.use_fuzzy) 757 write_mo(outfile, catalog, use_fuzzy=options.use_fuzzy)
758 finally: 758 finally:
759 outfile.close() 759 outfile.close()
760 760
Copyright (C) 2012-2017 Edgewall Software