Merge ~marcoscarvalho46/ubuntu/+source/aptdaemon:ubuntu/devel into ubuntu/+source/aptdaemon:ubuntu/devel

Proposed by Marcos
Status: Rejected
Rejected by: Robie Basak
Proposed branch: ~marcoscarvalho46/ubuntu/+source/aptdaemon:ubuntu/devel
Merge into: ubuntu/+source/aptdaemon:ubuntu/devel
Diff against target: 42 lines (+6/-6)
1 file modified
aptdaemon/client.py (+6/-6)
Reviewer Review Type Date Requested Status
Julian Andres Klode (community) Disapprove
git-ubuntu developers Pending
Review via email: mp+392470@code.launchpad.net

Commit message

[Fix] Use of 'async' as a variable name as that is now a keyword in Python 3.7.

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

This has been fixed already in debian/patches/python3.7-compat.patch on platforms with 3.7

review: Disapprove

Unmerged commits

46b9d03... by Marcos

[Fix] Use of 'async' as a variable name as that is now a keyword in Python 3.7.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/aptdaemon/client.py b/aptdaemon/client.py
2index c9fccd2..c694a9e 100644
3--- a/aptdaemon/client.py
4+++ b/aptdaemon/client.py
5@@ -1561,12 +1561,12 @@ class AptClient(object):
6
7 def _run_transaction(self, method_name, args, wait, reply_handler,
8 error_handler):
9- async = reply_handler and error_handler
10+ has_async = reply_handler and error_handler
11 try:
12 deferred = self._run_transaction_helper(method_name, args, wait,
13- async)
14+ has_async)
15 except Exception as error:
16- if async:
17+ if has_async:
18 error_handler(error)
19 return
20 else:
21@@ -1603,10 +1603,10 @@ class AptClient(object):
22 return trans
23
24 @defer.inline_callbacks
25- def _run_transaction_helper(self, method_name, args, wait, async):
26+ def _run_transaction_helper(self, method_name, args, wait, has_async):
27 daemon = get_aptdaemon(self.bus)
28 dbus_method = daemon.get_dbus_method(method_name)
29- if async:
30+ if has_async:
31 deferred = defer.Deferred()
32 dbus_method(reply_handler=deferred.callback,
33 error_handler=deferred.errback, *args, timeout=86400)
34@@ -1619,7 +1619,7 @@ class AptClient(object):
35 if self.terminal:
36 yield trans.set_terminal(self.terminal)
37 yield trans.sync()
38- if wait and async:
39+ if wait and has_async:
40 deferred_wait = defer.Deferred()
41 sig = trans.connect("finished",
42 lambda trans, exit:

Subscribers

People subscribed via source and target branches

to all changes: