Adding developer/troubleshooting section to Installation Instructions
[apex.git] / build / python-congressclient.diff
1 From 26d39efbb931e04a5e95d504c27ede12d0a81c43 Mon Sep 17 00:00:00 2001
2 From: Masahito Muroi <muroi.masahito@lab.ntt.co.jp>
3 Date: Fri, 25 Mar 2016 14:06:00 +0900
4 Subject: [PATCH] Allows DataSource's config field to have not dict type obj
5
6 CongressClient expects all datasource driver has dict object in
7 config field. It raises an error when a datasource doesn't have
8 any config.
9
10 This patch allows config fields to be None object.
11
12 Change-Id: I73354f1073f3f814854652eaeaa4b3bbe4bfcf7d
13 ---
14
15 diff --git a/congressclient/common/utils.py b/congressclient/common/utils.py
16 index 9a381e8..b5cedd4 100644
17 --- a/congressclient/common/utils.py
18 +++ b/congressclient/common/utils.py
19 @@ -77,6 +77,8 @@
20      :param data: a dict
21      :rtype: a string formatted to {a:b, c:d}
22      """
23 +    if not isinstance(data, dict):
24 +        return str(data)
25      return str({str(key): str(value) for key, value in data.items()})