From: Danny Al-Gaaf Date: Thu, 11 Jul 2013 14:04:07 +0000 (+0200) Subject: ceph_argparse.py: fix dangerous default value [] as arg X-Git-Tag: v0.68~151^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60c9ca625230ea8dc47228599f039600f1bcfa70;p=ceph.git ceph_argparse.py: fix dangerous default value [] as arg Fix valid pylint warning about "Dangerous default value [] as argument". Signed-off-by: Danny Al-Gaaf --- diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index e2a486e8776..5fce3140dad 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -879,7 +879,7 @@ def validate_command(parsed_args, sigdict, args, verbose=False): return valid_dict -def send_command(cluster, target=('mon', ''), cmd=[], inbuf='', timeout=0, +def send_command(cluster, target=('mon', ''), cmd=None, inbuf='', timeout=0, verbose=False): """ Send a command to a daemon using librados's @@ -892,6 +892,7 @@ def send_command(cluster, target=('mon', ''), cmd=[], inbuf='', timeout=0, If target is osd.N, send command to that osd (except for pgid cmds) """ + cmd = cmd or [] try: if target[0] == 'osd': osdid = target[1]