#22773 closed Bug (fixed)
makemessages crashes with empty templatized files
| Reported by: | anonymous | Owned by: | Claude Paroz |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | 1.7-beta-2 |
| Severity: | Normal | Keywords: | makemessages |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
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: