diff options
author | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
commit | 7a6e7cc45b9afe799770313a66c4211d1986ff30 (patch) | |
tree | 189c7fa2e7ca9835e14975093c12b7e5d3d8213b /kombu/transport/pyro.py | |
parent | 016f4accb634ebc3eb8fc66741f23552e5966ea7 (diff) | |
download | kombu-7a6e7cc45b9afe799770313a66c4211d1986ff30.tar.gz |
pyupgrade
Diffstat (limited to 'kombu/transport/pyro.py')
-rw-r--r-- | kombu/transport/pyro.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kombu/transport/pyro.py b/kombu/transport/pyro.py index 7e022273..6d5a0a97 100644 --- a/kombu/transport/pyro.py +++ b/kombu/transport/pyro.py @@ -11,7 +11,6 @@ This broker can be launched by simply executing this transport module directly, with the command: ``python -m kombu.transport.pyro`` """ -from __future__ import absolute_import, unicode_literals import sys @@ -42,7 +41,7 @@ class Channel(virtual.Channel): """Pyro Channel.""" def close(self): - super(Channel, self).close() + super().close() if self.shared_queues: self.shared_queues._pyroRelease() @@ -129,7 +128,7 @@ if pyro is not None: @pyro.expose @pyro.behavior(instance_mode="single") - class KombuBroker(object): + class KombuBroker: """Kombu Broker used by the Pyro transport. You have to run this as a separate (Pyro) service. @@ -174,11 +173,11 @@ if pyro is not None: if __name__ == "__main__": print("Launching Broker for Kombu's Pyro transport.") with pyro.Daemon() as daemon: - print("(Expecting a Pyro name server at {0}:{1})" + print("(Expecting a Pyro name server at {}:{})" .format(pyro.config.NS_HOST, pyro.config.NS_PORT)) with pyro.locateNS() as ns: print("You can connect with Kombu using the url " - "'pyro://{0}/kombu.broker'".format(pyro.config.NS_HOST)) + "'pyro://{}/kombu.broker'".format(pyro.config.NS_HOST)) uri = daemon.register(KombuBroker) ns.register("kombu.broker", uri) daemon.requestLoop() |