From a38bd7964b419c769fb80a7e432ff937980cd802 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Tue, 24 Nov 2015 16:07:16 +0300 Subject: [PATCH] Fix mutable default values for function Default value: {} -> None, inside: if None -> {} Change-Id: I97866f32dc1a8d74f52aa2810efdd96520516c7d Closes-bug: #1519346 --- devops/models/network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devops/models/network.py b/devops/models/network.py index e89dea78..6018d69f 100644 --- a/devops/models/network.py +++ b/devops/models/network.py @@ -258,11 +258,13 @@ def addresses(self): @staticmethod def interface_create(network, node, type='network', mac_address=None, model='virtio', - interface_map={}): + interface_map=None): """Create interface :rtype : Interface """ + if interface_map is None: + interface_map = {} interfaces = [] def _create(mac_addr=None):