diff --git a/.pylintrc b/.pylintrc index ab90f25137c..4cd37c328a0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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, diff --git a/neutron/agent/linux/iptables_firewall.py b/neutron/agent/linux/iptables_firewall.py index b925ba2ee65..246c51858ad 100644 --- a/neutron/agent/linux/iptables_firewall.py +++ b/neutron/agent/linux/iptables_firewall.py @@ -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 diff --git a/neutron/common/utils.py b/neutron/common/utils.py index 31e562c4b51..7adc9f424d3 100644 --- a/neutron/common/utils.py +++ b/neutron/common/utils.py @@ -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: diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py index dce6c8490a0..29475a020f0 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py @@ -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) diff --git a/neutron/services/trunk/drivers/openvswitch/agent/driver.py b/neutron/services/trunk/drivers/openvswitch/agent/driver.py index c24ac62d2bc..68e43422090 100644 --- a/neutron/services/trunk/drivers/openvswitch/agent/driver.py +++ b/neutron/services/trunk/drivers/openvswitch/agent/driver.py @@ -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