Shifted try except block placement
This commit is contained in:
parent
222cfaa92a
commit
2821f0f667
|
@ -245,6 +245,9 @@ class namecoinConnection(object):
|
||||||
"Authorization", "Basic %s" % base64.b64encode(authstr))
|
"Authorization", "Basic %s" % base64.b64encode(authstr))
|
||||||
self.con.endheaders()
|
self.con.endheaders()
|
||||||
self.con.send(data)
|
self.con.send(data)
|
||||||
|
except: # noqa:E722
|
||||||
|
logger.info("HTTP connection error")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resp = self.con.getresponse()
|
resp = self.con.getresponse()
|
||||||
result = resp.read()
|
result = resp.read()
|
||||||
|
@ -254,8 +257,6 @@ class namecoinConnection(object):
|
||||||
" %i: %s" % (resp.status, resp.reason))
|
" %i: %s" % (resp.status, resp.reason))
|
||||||
except: # noqa:E722
|
except: # noqa:E722
|
||||||
logger.info("HTTP receive error")
|
logger.info("HTTP receive error")
|
||||||
except: # noqa:E722
|
|
||||||
logger.info("HTTP connection error")
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user