lp-project-upload TypeError in edit_file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lptools |
New
|
Undecided
|
Unassigned |
Bug Description
Running lp-project-upload without a changelog or releasenotes gives:
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
changelog = edit_file(
File "/usr/bin/
os.write(fd, '\n\n#------\n# Please enter the %s here. '
TypeError: a bytes-like object is required, not 'str'
Fixed it with:
72,77c72,77
< (fd, f) = tempfile.
< os.write(fd, '\n\n#------\n# Please enter the %s here. '
< 'Lines which start with "#" are ignored.\n' % description)
< os.close(fd)
< subprocess.
< return cat_file(f)
---
> (fd, path) = tempfile.
> with os.fdopen(fd, 'w') as f:
> f.write(
> 'Lines which start with "#" are ignored.\n' % description)
> subprocess.
> return cat_file(path)
This should be fixed in lp:~jelmer/lptools/breezy-python3/