Merge lp:~seb128/software-properties/except_variable_name into lp:software-properties

Proposed by Sebastien Bacher
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 939
Merged at revision: 939
Proposed branch: lp:~seb128/software-properties/except_variable_name
Merge into: lp:software-properties
Diff against target: 19 lines (+4/-4)
1 file modified
softwareproperties/gtk/DialogCacheOutdated.py (+4/-4)
To merge this branch: bzr merge lp:~seb128/software-properties/except_variable_name
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+272617@code.launchpad.net

Commit message

use different variable name in exception, python3 deletes the target

Description of the change

use different variable name in exception, python3 deletes the target

see http://legacy.python.org/dev/peps/pep-3110/#semantic-changes for explanation on the behaviour

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

After looking at the file context (with error being initialized upper), +1!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwareproperties/gtk/DialogCacheOutdated.py'
2--- softwareproperties/gtk/DialogCacheOutdated.py 2014-09-11 09:06:49 +0000
3+++ softwareproperties/gtk/DialogCacheOutdated.py 2015-09-28 14:58:00 +0000
4@@ -57,11 +57,11 @@
5 except aptdaemon.errors.NotAuthorizedError:
6 # Silently ignore auth failures
7 return
8- except aptdaemon.errors.TransactionFailed as error:
9- pass
10- except Exception as error:
11+ except aptdaemon.errors.TransactionFailed as _error:
12+ error = _error
13+ except Exception as _error:
14 error = aptdaemon.errors.TransactionFailed(aptdaemon.enums.ERROR_UNKNOWN,
15- str(error))
16+ str(_error))
17 dia = AptErrorDialog(error)
18 dia.run()
19 dia.hide()

Subscribers

People subscribed via source and target branches

to status/vote changes: