summaryrefslogtreecommitdiff
path: root/cloudinit/UserDataHandler.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-12 16:55:45 +0100
committerScott Moser <smoser@ubuntu.com>2012-01-12 16:55:45 +0100
commit38f913377554f27159171a505b5805ee2537a905 (patch)
treed700c8cde638f7ae26a2facfc414f826305bad5b /cloudinit/UserDataHandler.py
parent8b795f21caa5758138bb19a4f0412b80b6db9c99 (diff)
downloadvyos-cloud-init-38f913377554f27159171a505b5805ee2537a905.tar.gz
vyos-cloud-init-38f913377554f27159171a505b5805ee2537a905.zip
[PATCH 10/13] Fix pylint warnings W0102 (dangerous default value as
From: Juerg Haefliger <juerg.haefliger@hp.com> argument)
Diffstat (limited to 'cloudinit/UserDataHandler.py')
-rw-r--r--cloudinit/UserDataHandler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py
index 2d257d12..14aea58b 100644
--- a/cloudinit/UserDataHandler.py
+++ b/cloudinit/UserDataHandler.py
@@ -188,7 +188,9 @@ def process_includes(msg, appendmsg=None):
_attach_part(appendmsg, part)
-def message_from_string(data, headers={}):
+def message_from_string(data, headers=None):
+ if headers is None:
+ headers = {}
if "mime-version:" in data[0:4096].lower():
msg = email.message_from_string(data)
for (key,val) in headers.items():