diff --git a/test-requirements.txt b/test-requirements.txt index 3edcbaa4..a5e00c9a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD oslotest>=1.10.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 3bd467f2..6d96849f 100644 --- a/tox.ini +++ b/tox.ini @@ -72,13 +72,15 @@ commands = # # H404 skipped on purpose per jay pipes discussion. # +# W504 line break after binary operator +# # Due to the upgrade to hacking 0.9.2 the following checking are # ignored on purpose for the moment and should be re-enabled. # H106: Don’t put vim configuration in source files # H203: Use assertIs(Not)None to check for None show-source = True -ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404 +ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404,W504 enable-extensions=H106,H203 builtins = _ exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build diff --git a/vif_plug_linux_bridge/iptables.py b/vif_plug_linux_bridge/iptables.py index beafc789..c6f5c1c0 100644 --- a/vif_plug_linux_bridge/iptables.py +++ b/vif_plug_linux_bridge/iptables.py @@ -39,6 +39,7 @@ def get_binary_name(): """Grab the name of the binary we're running in.""" return os.path.basename(inspect.stack()[-1][1])[:16] + binary_name = get_binary_name() diff --git a/vif_plug_ovs/linux_net.py b/vif_plug_ovs/linux_net.py index 20baab31..0d677a60 100644 --- a/vif_plug_ovs/linux_net.py +++ b/vif_plug_ovs/linux_net.py @@ -287,11 +287,11 @@ def get_representor_port(pf_ifname, vf_num): # the PCI func number of pf_ifname. rep_parent_pf_func = _parse_pf_number(phys_port_name) if rep_parent_pf_func is not None: - ifname_pf_func = _get_pf_func(pf_ifname) - if ifname_pf_func is None: - continue - if int(rep_parent_pf_func) != int(ifname_pf_func): - continue + ifname_pf_func = _get_pf_func(pf_ifname) + if ifname_pf_func is None: + continue + if int(rep_parent_pf_func) != int(ifname_pf_func): + continue representor_num = _parse_vf_number(phys_port_name) # Note: representor_num can be 0, referring to VF0