Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

IMP Continue to the next server if one fails

  • Loading branch information...
commit 119ad03aff07247fee7d668e0a662e6889f4eaae 1 parent 06667a8
@ecarreras ecarreras authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 proxy.py
View
11 proxy.py
@@ -76,10 +76,13 @@ def proxy_db_list():
for proxy in proxy_obj.browse(cursor, uid, pr_ids):
dbsock = xmlrpclib.ServerProxy('http://%s:%i/xmlrpc/db' %
(proxy.host, proxy.port))
- for remote_db in dbsock.list():
- res.append(remote_db)
- up_servers.append(remote_db)
- _PROXY_SERVERS[remote_db] = (proxy.host, proxy.port)
+ try:
+ for remote_db in dbsock.list():
+ res.append(remote_db)
+ up_servers.append(remote_db)
+ _PROXY_SERVERS[remote_db] = (proxy.host, proxy.port)
+ except:
+ continue
except Exception:
pass
finally:

1 comment on commit 119ad03

@marc0s

LGTM

Please sign in to comment.
Something went wrong with that request. Please try again.