summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-01 13:58:01 +0000
committerGerrit Code Review <review@openstack.org>2015-07-01 13:58:01 +0000
commit585d13988e0aca74abb6512ef878ead85e88b03b (patch)
treea084e3cc582f9c9fae15f65f74a4c063e6112705
parent6e4d7fbb0fdb84ca535090dd232ba63c7b398b01 (diff)
parent0b1be909703a3d08ae8c2cf76ab141a744839eab (diff)
downloadpython-ceilometerclient-585d13988e0aca74abb6512ef878ead85e88b03b.tar.gz
Merge "Change default values from [] to None"
-rw-r--r--ceilometerclient/v1/meters.py3
-rw-r--r--ceilometerclient/v2/statistics.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/ceilometerclient/v1/meters.py b/ceilometerclient/v1/meters.py
index c8a784b..223bfb3 100644
--- a/ceilometerclient/v1/meters.py
+++ b/ceilometerclient/v1/meters.py
@@ -18,8 +18,9 @@ import six
from ceilometerclient.common import base
-def _get_opt_path(simple_params=[], **kwargs):
+def _get_opt_path(simple_params=None, **kwargs):
l = []
+ simple_params = simple_params or []
# get simple paramters
for key in simple_params:
val = kwargs.get(key)
diff --git a/ceilometerclient/v2/statistics.py b/ceilometerclient/v2/statistics.py
index a5cce23..4775238 100644
--- a/ceilometerclient/v2/statistics.py
+++ b/ceilometerclient/v2/statistics.py
@@ -44,7 +44,10 @@ class StatisticsManager(base.Manager):
)
return url_aggregates
- def list(self, meter_name, q=None, period=None, groupby=[], aggregates=[]):
+ def list(self, meter_name, q=None, period=None, groupby=None,
+ aggregates=None):
+ groupby = groupby or []
+ aggregates = aggregates or []
p = ['period=%s' % period] if period else []
if isinstance(groupby, six.string_types):
groupby = [groupby]