diff options
author | Michael Chapman <michapma@redhat.com> | 2016-07-12 10:04:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-07-12 10:04:24 +0000 |
commit | 23530516f2ceca4f1215140a287016288923ad47 (patch) | |
tree | 279b194b56bdd1c5d8906de70a224eb5a79a94b4 /build/python-congressclient.diff | |
parent | 87860a11da4fd4f140974b40193463e8a256523c (diff) | |
parent | dfc2eb500dd291efdb0e3b7c467e4f330911d7bc (diff) |
Merge "Adding doctor driver and datasource"
Diffstat (limited to 'build/python-congressclient.diff')
-rw-r--r-- | build/python-congressclient.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build/python-congressclient.diff b/build/python-congressclient.diff new file mode 100644 index 00000000..82e76e07 --- /dev/null +++ b/build/python-congressclient.diff @@ -0,0 +1,25 @@ +From 26d39efbb931e04a5e95d504c27ede12d0a81c43 Mon Sep 17 00:00:00 2001 +From: Masahito Muroi <muroi.masahito@lab.ntt.co.jp> +Date: Fri, 25 Mar 2016 14:06:00 +0900 +Subject: [PATCH] Allows DataSource's config field to have not dict type obj + +CongressClient expects all datasource driver has dict object in +config field. It raises an error when a datasource doesn't have +any config. + +This patch allows config fields to be None object. + +Change-Id: I73354f1073f3f814854652eaeaa4b3bbe4bfcf7d +--- + +diff --git a/congressclient/common/utils.py b/congressclient/common/utils.py +index 9a381e8..b5cedd4 100644 +--- a/congressclient/common/utils.py ++++ b/congressclient/common/utils.py +@@ -77,6 +77,8 @@ + :param data: a dict + :rtype: a string formatted to {a:b, c:d} + """ ++ if not isinstance(data, dict): ++ return str(data) + return str({str(key): str(value) for key, value in data.items()}) |