Merge lp://staging/~sinzui/bzr-gtk/precise-commit-1 into lp://staging/bzr-gtk
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~sinzui/bzr-gtk/precise-commit-1 |
Merge into: | lp://staging/bzr-gtk |
Diff against target: |
106 lines (+63/-0) 2 files modified
commit.py (+4/-0) tests/test_commit.py (+59/-0) |
To merge this branch: | bzr merge lp://staging/~sinzui/bzr-gtk/precise-commit-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bazaar GTK maintainers | Pending | ||
Review via email: mp+89598@code.staging.launchpad.net |
This proposal has been superseded by a proposal from 2012-01-22.
Commit message
Do not assume the treeselection exist when the widget is being destroyed.
Description of the change
I consistently see an error when committing using the bzr-gtk lib.
/usr/lib/
import gobject._gobject
Traceback (most recent call last):
File "/home/
(model, selection) = treeselection.
AttributeError: 'NoneType' object has no attribute 'get_selected'
The commit is successful, maybe this error is happening when the window
is being torn down. The error also appears when the dialog is canceled.
There is not error when using the command directly. I think this is an issue
with the calling app calling destroy()
_on_treeview_
The method could also exit early if there is no treeselection
-------
RULES
* Ensure that there is a treeselection before accessing it.
* Add tests for the no treeselection and no selection condition
* test_file_selection implicitly tests the case when there is a
selection.
QA
Use Gedit with GDP Bzr enabled from the console under precise.
* Open any file under version control.
* Choose Project > Commit
* Cancel the action
* Verify there is no AttributeError on stdout