Merge "Fix some new pylint "W" warnings"

This commit is contained in:
Zuul 2023-08-02 11:03:07 +00:00 committed by Gerrit Code Review
commit 62bbfad8ff
5 changed files with 4 additions and 10 deletions

View File

@ -56,13 +56,10 @@ disable=
raise-missing-from,
arguments-renamed,
broad-exception-raised,
modified-iterating-list,
unspecified-encoding,
missing-timeout,
implicit-str-concat,
redundant-u-string-prefix,
unused-private-member,
global-variable-not-assigned,
# "C" Coding convention violations
consider-iterating-dictionary,
consider-using-enumerate,

View File

@ -731,7 +731,7 @@ class IptablesFirewallDriver(firewall.FirewallDriver):
def _drop_invalid_packets(self, iptables_rules):
# Always drop invalid packets
iptables_rules += [comment_rule('-m state --state ' 'INVALID -j DROP',
iptables_rules += [comment_rule('-m state --state INVALID -j DROP',
comment=ic.INVALID_DROP)]
return iptables_rules

View File

@ -772,7 +772,7 @@ def attach_exc_details(e, msg, args=_NO_ARGS_MARKER):
def extract_exc_details(e):
for attr in ('_error_context_msg', '_error_context_args'):
if not hasattr(e, attr):
return u'No details.'
return 'No details.'
details = e._error_context_msg
args = e._error_context_args
if args is _NO_ARGS_MARKER:

View File

@ -284,7 +284,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
# Remove the common ones
for na in list(neutron_acls):
for ovn_a in ovn_acls:
for ovn_a in ovn_acls.copy():
if all(item in na.items() for item in ovn_a.items()):
neutron_acls.remove(na)
ovn_acls.remove(ovn_a)

View File

@ -104,8 +104,5 @@ def init_handler(resource, event, trigger, payload=None):
def unregister():
"""Cleanup fanout queues"""
global TRUNK_SKELETON
try:
if TRUNK_SKELETON:
TRUNK_SKELETON.unregister()
except AttributeError:
pass