[Reportbug-maint] Bug#680465: reportbug: crash if tilde ("~") is used in output file path -- data lost!

Fritz Wuehler fritz at spamexpire-201207.rodent.frell.theremailer.net
Fri Jul 6 03:44:09 UTC 2012


Package: reportbug
Version: 4.12.6
Severity: important


When invoking bugreport --output=~/myreport.txt, everything is normal
long enough for the user to spend time writing a report, then in the
end it crashes, losing all data that was composed.  This is serious.
Someone takes the time to fill out a report, and all their work is
lost.

At the end, the faulty output looks like this:

  Report will be saved as ~/myreport.txt
  Submit this report on libgdata7 (e to edit) [Y|n|a|c|e|i|l|m|p|q|d|t|s|?]?
  Traceback (most recent call last):
    File "/usr/bin/reportbug", line 2098, in <module>
      main()
    File "/usr/bin/reportbug", line 1045, in main
      return iface.user_interface()
    File "/usr/bin/reportbug", line 2090, in user_interface
      self.options.draftpath)
    File "/usr/lib/pymodules/python2.6/reportbug/submit.py", line 331, in send_report
      fh.write(message.as_string())
  AttributeError: 'str' object has no attribute 'as_string'

The workaround is to use $HOME instead of "~".

-- Package-specific info:
** Environment settings:
EDITOR="emacs"
INTERFACE="text"

** /home/jg/.reportbugrc:
reportbug_version "4.12.6"
mode novice
ui text

-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages reportbug depends on:
ii  apt                    0.8.10.3+squeeze1 Advanced front-end for dpkg
ii  python                 2.6.6-3+squeeze7  interactive high-level object-orie
ii  python-reportbug       4.12.6            Python modules for interacting wit

reportbug recommends no packages.

Versions of packages reportbug suggests:
pn  debconf-utils        <none>              (no description available)
pn  debsums              <none>              (no description available)
pn  dlocate              <none>              (no description available)
ii  emacs23-bin-common   23.2+1-7            The GNU Emacs editor's shared, arc
ii  file                 5.04-5+squeeze2     Determines file type using "magic"
ii  gnupg                1.4.10-4            GNU privacy guard - a free PGP rep
ii  postfix [mail-transp 2.7.1-1+squeeze1    High-performance mail transport ag
ii  python-gtk2          2.17.0-4            Python bindings for the GTK+ widge
pn  python-gtkspell      <none>              (no description available)
pn  python-urwid         <none>              (no description available)
ii  python-vte           1:0.24.3-3          Python bindings for the VTE widget
ii  xdg-utils            1.0.2+cvs20100307-2 desktop integration utilities from

-- no debconf information






More information about the Reportbug-maint mailing list