diff options
Diffstat (limited to 'debian/patches/do-not-raise-stopiteration.patch')
-rw-r--r-- | debian/patches/do-not-raise-stopiteration.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/debian/patches/do-not-raise-stopiteration.patch b/debian/patches/do-not-raise-stopiteration.patch deleted file mode 100644 index 7813b36..0000000 --- a/debian/patches/do-not-raise-stopiteration.patch +++ /dev/null @@ -1,68 +0,0 @@ -Description: Adjust stopping generators for PEP479 - Adjust aptdaemon for PEP479, where raise StopIteration - stopped working and should become return. -Author: Julian Andres Klode <juliank@ubuntu.com> -Last-Update: 2019-03-27 - ---- aptdaemon-1.1.1+bzr982.orig/aptdaemon/core.py -+++ aptdaemon-1.1.1+bzr982/aptdaemon/core.py -@@ -935,7 +935,7 @@ class Transaction(DBusObject): - self.progress = 9 - yield self._simulate_real() - else: -- raise StopIteration -+ return - - @inline_callbacks - def _check_auth(self): -@@ -946,7 +946,7 @@ class Transaction(DBusObject): - self.status = enums.STATUS_AUTHENTICATING - action = self.ROLE_ACTION_MAP[self.role] - if action is None: -- raise StopIteration -+ return - # Special case if InstallPackages only touches stuff from the - # high trust whitelist - if (self.role in (enums.ROLE_INSTALL_PACKAGES, -@@ -1028,16 +1028,16 @@ class Transaction(DBusObject): - else: - self.status = enums.STATUS_CANCELLING - self.exit = enums.EXIT_CANCELLED -- raise StopIteration -+ return - if self.tid in self.queue.limbo: - self.exit = enums.EXIT_CANCELLED -- raise StopIteration -+ return - elif self.cancellable: - log_trans.debug("Setting cancel event") - self.cancelled = True - self.status = enums.STATUS_CANCELLING - self.paused = False -- raise StopIteration -+ return - raise errors.AptDaemonError("Could not cancel transaction") - - # pylint: disable-msg=C0103,C0322 ---- aptdaemon-1.1.1+bzr982.orig/aptdaemon/networking.py -+++ aptdaemon-1.1.1+bzr982/aptdaemon/networking.py -@@ -177,7 +177,7 @@ class NetworkManagerMonitor(NetworkMonit - def _on_nm_active_conn_props_changed(self, props): - """Callback if properties of the active connection changed.""" - if "Default" not in props: -- raise StopIteration -+ return - yield self.get_network_state() - - @inline_callbacks ---- aptdaemon-1.1.1+bzr982.orig/doc/source/aptdaemon.client.rst -+++ aptdaemon-1.1.1+bzr982/doc/source/aptdaemon.client.rst -@@ -91,7 +91,7 @@ code in a synchronous way: - ... transaction = yield apt_client.update() - ... except errors.NotAuthorizedError: - ... print "You are not allowed to update the cache!" -- ... raise StopIteration -+ ... return - ... yield transaction.set_locale("de_DE") - ... yield transaction.run() - ... print "Transaction has started" |