diff options
Diffstat (limited to 'debian/patches/python3.7-compat.patch')
-rw-r--r-- | debian/patches/python3.7-compat.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/patches/python3.7-compat.patch b/debian/patches/python3.7-compat.patch new file mode 100644 index 0000000..867c6d2 --- /dev/null +++ b/debian/patches/python3.7-compat.patch @@ -0,0 +1,53 @@ +Description: do not use 'async' as a variable name + It is a keyword in Python 3.7. +Author: Michael Hudson-Doyle <michael.hudson@ubuntu.com> +Origin: vendor +Last-Update: 2018-08-02 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/aptdaemon/client.py ++++ b/aptdaemon/client.py +@@ -1567,17 +1567,17 @@ + + def _run_transaction(self, method_name, args, wait, reply_handler, + error_handler): +- async = reply_handler and error_handler ++ async_ = reply_handler and error_handler + try: + deferred = self._run_transaction_helper(method_name, args, wait, +- async) ++ async_) + except Exception as error: +- if async: ++ if async_: + error_handler(error) + return + else: + raise +- if async: ++ if async_: + def on_error(error): + """Convert the DeferredException to a normal exception.""" + try: +@@ -1609,10 +1609,10 @@ + return trans + + @defer.inline_callbacks +- def _run_transaction_helper(self, method_name, args, wait, async): ++ def _run_transaction_helper(self, method_name, args, wait, async_): + daemon = get_aptdaemon(self.bus) + dbus_method = daemon.get_dbus_method(method_name) +- if async: ++ if async_: + deferred = defer.Deferred() + dbus_method(reply_handler=deferred.callback, + error_handler=deferred.errback, *args, +@@ -1626,7 +1626,7 @@ + if self.terminal: + yield trans.set_terminal(self.terminal) + yield trans.sync() +- if wait and async: ++ if wait and async_: + deferred_wait = defer.Deferred() + sig = trans.connect("finished", + lambda trans, exit: |