mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
Fix except statements for Py2.5 compat
This commit is contained in:
parent
08c03d7678
commit
1f315a9ef0
2 changed files with 3 additions and 3 deletions
|
@ -206,7 +206,7 @@ class ConnectionManager(component.Component):
|
|||
|
||||
try:
|
||||
gethostbyname(host)
|
||||
except gaierror as ex:
|
||||
except gaierror, ex:
|
||||
raise Exception("Host '%s': %s" % (host, ex.args[1]))
|
||||
|
||||
# Host isn't in the list, so lets add it
|
||||
|
@ -311,7 +311,7 @@ class ConnectionManager(component.Component):
|
|||
|
||||
try:
|
||||
ip = gethostbyname(host)
|
||||
except gaierror as ex:
|
||||
except gaierror, ex:
|
||||
log.error("Error resolving host %s to ip: %s", host, ex.args[1])
|
||||
continue
|
||||
|
||||
|
|
|
@ -919,7 +919,7 @@ class WebApi(JSONComponent):
|
|||
|
||||
try:
|
||||
gethostbyname(host)
|
||||
except gaierror as ex:
|
||||
except gaierror, ex:
|
||||
return (False, "Hostname error: %s" % ex.args[1])
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue