Flagging review fails (ValidationException: Argument 'reason' must be a string)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-center (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
software-center trunk r2415, Ubuntu 11.10 beta
1. Click the "Inappropriate?" link below a review.
2. Choose a reason, enter some text, and click "Report".
What happens:
* A "Failed to submit" error.
* In ~/.cache/
------------
flag_review failed
Traceback (most recent call last):
File "./data/
text=text)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
"Argument '%s' must be a string" % varname)
ValidationExcep
Argument 'reason' must be a string
------------
The following test program shows the failure:
#!/usr/bin/python
from gi.repository import Gtk
from gettext import gettext as _
def on_button_ clicked( button, combo): active_ text()
print combo
print combo.get_
if __name__ == "__main__":
win = Gtk.Window() set_size_ request( 500,200)
win.
box = Gtk.VBox()
win.add(box)
combo = Gtk.ComboBoxText()
_(" Offensive language"),
_(" Other") ]:
combo. append_ text(term) set_active( 0)
for term in [ _(u"Please make a selection\u2026"),
combo.
button = Gtk.Button( "get_active_ text") connect( "clicked" , on_button_clicked, combo) pack_start( combo, False, False, 0) pack_start( button, False, False, 0) connect( "destroy" , lambda w: Gtk.main_quit())
button.
box.
box.
win.
win.show_all()
Gtk.main()
*BUT* t.new() is used instead its fine.
if Gtk.ComboBoxTex