Merge "Use except x as y instead of except x, y"
This commit is contained in:
commit
5a2fd98c8e
@ -188,7 +188,7 @@ def ssh_connect(ip, username, connect_kwargs={}, timeout=60):
|
|||||||
try:
|
try:
|
||||||
client = SSHClient(ip, username, **connect_kwargs)
|
client = SSHClient(ip, username, **connect_kwargs)
|
||||||
break
|
break
|
||||||
except socket.error, e:
|
except socket.error as e:
|
||||||
print "While testing ssh access:", e
|
print "While testing ssh access:", e
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ class LogRetriever(threading.Thread):
|
|||||||
raw_buf = b''
|
raw_buf = b''
|
||||||
try:
|
try:
|
||||||
gzipped, raw_buf = self._get_log_data(source_url, retry)
|
gzipped, raw_buf = self._get_log_data(source_url, retry)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError as e:
|
||||||
if e.code == 404:
|
if e.code == 404:
|
||||||
logging.info("Unable to retrieve %s: HTTP error 404" %
|
logging.info("Unable to retrieve %s: HTTP error 404" %
|
||||||
source_url)
|
source_url)
|
||||||
|
1
tox.ini
1
tox.ini
@ -31,6 +31,7 @@ commands = python modules/accessbot/files/checkaccess.py -l modules/openstack_pr
|
|||||||
show-source = True
|
show-source = True
|
||||||
exclude = .tox
|
exclude = .tox
|
||||||
ignore = E125,H
|
ignore = E125,H
|
||||||
|
select = H231
|
||||||
|
|
||||||
[testenv:jjb]
|
[testenv:jjb]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
|
Loading…
Reference in New Issue
Block a user