#22773 closed Bug (fixed)
makemessages crashes with empty templatized files
Description ¶
If templatize return empty string, then raise exception on fp.write.
django 1.7b4
makemessages.py:97
content = templatize(src_data, orig_file[2:]) # return '' (str) with io.open(os.path.join(self.dirpath, thefile), "w", encoding='utf-8') as fp: fp.write(content) # TypeError: must be unicode, not str
Tested in Windows7x64, Python 2.7.7x87
Change History (3)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | makemessages bug → makemessages crashes with empty templatized files |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In daaeb8415823444a9020460cf825efc3fae866a2: