Merge lp:~mvo/aptdaemon/exception-fixes2 into lp:aptdaemon

Proposed by Michael Vogt
Status: Merged
Merged at revision: 737
Proposed branch: lp:~mvo/aptdaemon/exception-fixes2
Merge into: lp:aptdaemon
Diff against target: 51 lines (+4/-4)
4 files modified
doc/examples/chained.py (+1/-1)
gtk-demo.py (+1/-1)
gtk3-demo.py (+1/-1)
tests/test_dbus_type.py (+1/-1)
To merge this branch: bzr merge lp:~mvo/aptdaemon/exception-fixes2
Reviewer Review Type Date Requested Status
Aptdaemon Developers Pending
Review via email: mp+83557@code.launchpad.net

Description of the change

Found some small leftovers from the old-style to the new-style exception handling.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/examples/chained.py'
2--- doc/examples/chained.py 2010-09-28 17:45:33 +0000
3+++ doc/examples/chained.py 2011-11-28 08:43:23 +0000
4@@ -37,7 +37,7 @@
5 yield trans_update.run_after(trans_add)
6 yield trans_inst.run_after(trans_update)
7 yield trans_add.run()
8- except Exception, error:
9+ except Exception as error:
10 print error
11 loop.quit()
12
13
14=== modified file 'gtk-demo.py'
15--- gtk-demo.py 2011-11-24 16:22:54 +0000
16+++ gtk-demo.py 2011-11-28 08:43:23 +0000
17@@ -66,7 +66,7 @@
18 except aptdaemon.errors.NotAuthorizedError:
19 # Silently ignore auth failures
20 return
21- except aptdaemon.errors.TransactionFailed, error:
22+ except aptdaemon.errors.TransactionFailed as error:
23 pass
24 except Exception as error:
25 error = aptdaemon.errors.TransactionFailed(ERROR_UNKNOWN,
26
27=== modified file 'gtk3-demo.py'
28--- gtk3-demo.py 2011-11-24 16:22:54 +0000
29+++ gtk3-demo.py 2011-11-28 08:43:23 +0000
30@@ -71,7 +71,7 @@
31 except aptdaemon.errors.NotAuthorizedError:
32 # Silently ignore auth failures
33 return
34- except aptdaemon.errors.TransactionFailed, error:
35+ except aptdaemon.errors.TransactionFailed as error:
36 pass
37 except Exception as error:
38 error = aptdaemon.errors.TransactionFailed(ERROR_UNKNOWN,
39
40=== modified file 'tests/test_dbus_type.py'
41--- tests/test_dbus_type.py 2011-11-18 12:09:54 +0000
42+++ tests/test_dbus_type.py 2011-11-28 08:43:23 +0000
43@@ -128,7 +128,7 @@
44 try:
45 for name, value in props.iteritems():
46 self._check_property_type(iface, name, value)
47- except Exception, error:
48+ except Exception as error:
49 self.error = error
50 raise
51 finally:

Subscribers

People subscribed via source and target branches

to status/vote changes: