[Reportbug-maint] Bug#769055: reportbug: AttributeError: 'NoneType' object has no attribute 'startswith'
brian at microcomaustralia.com.au
Tue Nov 11 00:54:05 UTC 2014
Not only did it crash, but there doesn't seem to be any sign of the temp
file any more, so I had to retype the bug report :-(
Report will be sent to "Debian Bug Tracking System" <submit at bugs.debian.org>
Submit this report on libapache2-mod-wsgi-py3 (e to edit)
Traceback (most recent call last):
File "/usr/bin/reportbug", line 2211, in <module>
File "/usr/bin/reportbug", line 1081, in main
File "/usr/bin/reportbug", line 2203, in user_interface
File "/usr/lib/python2.7/dist-packages/reportbug/submit.py", line 316, in
msgname = os.path.expanduser(outfile) or ('/var/tmp/%s.bug' % package)
File "/usr/lib/python2.7/posixpath.py", line 261, in expanduser
if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'
Looking at the code:
elif outfile or not ((mta and os.path.exists(mta)) or smtphost):
msgname = os.path.expanduser(outfile) or ('/var/tmp/%s.bug' % package)$
It would appear to be that outfile is None (not sure I understand why),
however the condition gets satisfied if a MTA is not installed or is
smtphost is defined.
It then crashes.
If this is an error condition, there needs to be a better error message,
and even better the temp file created by the editor should not get deleted.
Brian May <brian at microcomaustralia.com.au>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Reportbug-maint