[Reportbug-maint] Bug#535789: reportbug crash when trying to detach a not attached file

chaica chaica at ohmytux.com
Tue Jul 7 20:39:30 UTC 2009


tags 535789 confirmed
thanks

Hi,

This bug is confirmed. Removing "empty_ok=True" seems a good way to get
rid of this bug.

Bye,
Carl Chenet

> Package: reportbug
> Version: 4.4
> Severity: normal
> Tags: patch
> 
> 
> I was reporting a bug with reportbug, and click 'd' to detach a file. Then, I
> regret and hit enter (without writing anything) and reportbug crash with:
> 
> Select the file:
> Traceback (most recent call last):
>   File "/usr/bin/reportbug", line 1877, in <module>
>     main()
>   File "/usr/bin/reportbug", line 895, in main
>     return iface.user_interface()
>   File "/usr/bin/reportbug", line 1819, in user_interface
>     charset=charset)
>   File "/usr/bin/reportbug", line 254, in handle_editing
>     attachments.remove(filetodetach)
> ValueError: list.remove(x): x not in list
> 
> 
> I made two different patches to fix this (both attached).
> 
> One just removes the "empty_ok" option, so only valid files are accepted (so not
> detaching anything is not an option once you click 'd'). The other one checks if
> the file is in the list, if it is it removes it, and if its not, it does not
> detach anything (so if you just click enter, you dont detach anything).
> 
> I didn't check if there is any option more covenient in ui.menu, I have to go
> right now.
> 
> 
> 
> 
> Thanks a lot,
> Rodrigo
> 
> 
> -- Package-specific info:
> ** Environment settings:
> INTERFACE="text"
> 
> ** /home/rodrigo/.reportbugrc:
> reportbug_version "3.31"
> mode novice
> ui text
> email "rodrigo at sdfg.com.ar"
> no-cc
> header "X-Debbugs-CC: rodrigo at sdfg.com.ar"
> smtphost bugs.debian.org
> 
> -- System Information:
> Debian Release: squeeze/sid
>   APT prefers testing
>   APT policy: (990, 'testing'), (500, 'stable'), (400, 'unstable'), (200, 'experimental')
> Architecture: i386 (i686)
> 
> Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> 
> Versions of packages reportbug depends on:
> ii  apt                           0.7.21     Advanced front-end for dpkg
> ii  python                        2.5.4-2    An interactive high-level object-o
> ii  python-reportbug              4.4        Python modules for interacting wit
> 
> reportbug recommends no packages.
> 
> Versions of packages reportbug suggests:
> pn  debconf-utils                 <none>     (no description available)
> ii  debsums                       2.0.44     verification of installed package 
> pn  dlocate                       <none>     (no description available)
> ii  exim4                         4.69-11    metapackage to ease Exim MTA (v4) 
> ii  exim4-daemon-light [mail-tran 4.69-11    lightweight Exim MTA (v4) daemon
> ii  file                          5.03-1     Determines file type using "magic"
> ii  gnupg                         1.4.9-4    GNU privacy guard - a free PGP rep
> pn  python-gnome2-extras          <none>     (no description available)
> ii  python-gtk2                   2.14.1-3   Python bindings for the GTK+ widge
> pn  python-urwid                  <none>     (no description available)
> pn  python-vte                    <none>     (no description available)
> 
> -- no debconf information
> [check-file-attached.patch (text/plain, attachment)]
> [fix-detach-remove-empty_ok.patch (text/plain, attachment)]






More information about the Reportbug-maint mailing list