Raise hacking version to 2.0.0

We've kept hacking capped for a long time now. This raises the hacking
package version to the latest release and fixes the issues that it
found.

Change-Id: Ib13a3fe3f1a103b5e24a7c5bb7838ffdae2bf198
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-12-21 03:11:27 -06:00
parent df2a3969b7
commit 1448c7ff62
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
4 changed files with 19 additions and 16 deletions

View File

@ -19,7 +19,7 @@ fixtures==3.0.0
flake8==2.5.5
future==0.16.0
greenlet==0.4.10
hacking==0.12.0
hacking==2.0.0
idna==2.6
imagesize==0.7.1
iso8601==0.1.11

View File

@ -157,19 +157,19 @@ class DISCOConnector(base.BaseLinuxConnector):
client_port,
socket.AF_UNSPEC,
socket.SOCK_STREAM):
aff, socktype, proto, canonname, saa = res
try:
sock = socket.socket(aff, socktype, proto)
except socket.error:
sock = None
continue
try:
sock.connect(saa)
except socket.error:
sock.close()
sock = None
continue
break
aff, socktype, proto, canonname, saa = res
try:
sock = socket.socket(aff, socktype, proto)
except socket.error:
sock = None
continue
try:
sock.connect(saa)
except socket.error:
sock.close()
sock = None
continue
break
if sock is None:
LOG.error("Cannot connect TCP socket")

View File

@ -184,7 +184,10 @@ class LVM(executor.Executor):
consumed_space = pool_size / 100 * data_percent
free_space = pool_size - consumed_space
free_space = round(free_space, 2)
except putils.ProcessExecutionError as err:
# Need noqa due to a false error about the 'err' variable being unused
# even though it is used in the logging. Possibly related to
# https://github.com/PyCQA/pyflakes/issues/378.
except putils.ProcessExecutionError as err: # noqa
LOG.exception('Error querying thin pool about data_percent')
LOG.error('Cmd :%s', err.cmd)
LOG.error('StdOut :%s', err.stdout)

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=1.1.0,<1.2.0 # Apache-2.0
hacking>=2.0.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
reno>=2.5.0 # Apache-2.0