Skip to content

Commit

Permalink
Merge pull request #4 from hluk/xmlrpc-allow-none
Browse files Browse the repository at this point in the history
Retry on http.client.CannotSendRequest Koji XMLRPC exceptions
  • Loading branch information
hluk committed Apr 21, 2022
2 parents c6ab6b9 + cf32029 commit 5202fc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion greenwave/xmlrpc_server_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
log = logging.getLogger(__name__)

RETRY_ON_EXCEPTIONS = (
http.client.CannotSendRequest,
http.client.ResponseNotReady,
)
MAX_RETRIES = 3
Expand All @@ -31,7 +32,8 @@ def reconnect(self):
else:
transport = Transport(timeout=self.timeout)

self.proxy = xmlrpc.client.ServerProxy(self.uri, transport=transport)
self.proxy = xmlrpc.client.ServerProxy(
self.uri, transport=transport, allow_none=True)

def __getattr__(self, name):
return XmlRpcMethod(self, name)
Expand Down

0 comments on commit 5202fc5

Please sign in to comment.