]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix usage of mutable object as default value
authorGary Kotton <gkotton@vmware.com>
Thu, 29 Oct 2015 13:48:48 +0000 (06:48 -0700)
committerGary Kotton <gkotton@vmware.com>
Thu, 29 Oct 2015 13:48:48 +0000 (06:48 -0700)
Commit 0a300a2277a583fe28b00db2571982928c752554 added a bad parameter.
Please see http://docs.python-guide.org/en/latest/writing/gotchas/

Change-Id: I0550c4c86774f8761287c596350f7461fec05fe4

neutron/tests/functional/agent/l2/base.py

index 9a29a72c3e3a00e124198297da09cf0c717839b0..39e511b11dffd737ca1c54ab772978f0db60de9c 100644 (file)
@@ -120,7 +120,9 @@ class OVSAgentTestFramework(base.BaseOVSLinuxTestCase):
         agent.sg_agent = mock.Mock()
         return agent
 
-    def start_agent(self, agent, unplug_ports=[]):
+    def start_agent(self, agent, unplug_ports=None):
+        if unplug_ports is None:
+            unplug_ports = []
         self.setup_agent_rpc_mocks(agent, unplug_ports)
         polling_manager = polling.InterfacePollingMinimizer()
         self.addCleanup(polling_manager.stop)