diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:55:45 +0100 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:55:45 +0100 |
commit | 38f913377554f27159171a505b5805ee2537a905 (patch) | |
tree | d700c8cde638f7ae26a2facfc414f826305bad5b /cloudinit/__init__.py | |
parent | 8b795f21caa5758138bb19a4f0412b80b6db9c99 (diff) | |
download | vyos-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/__init__.py')
-rw-r--r-- | cloudinit/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index 0e35ab6e..72d988d5 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -297,7 +297,9 @@ class CloudInit: # if that does not exist, then call 'func' with given 'args' # if 'clear_on_fail' is True and func throws an exception # then remove the lock (so it would run again) - def sem_and_run(self,semname,freq,func,args=[],clear_on_fail=False): + def sem_and_run(self,semname,freq,func,args=None,clear_on_fail=False): + if args is None: + args = [] if self.sem_has_run(semname,freq): log.debug("%s already ran %s", semname, freq) return False |