| Index: scripts/slave/gatekeeper_ng_config.py
|
| diff --git a/scripts/slave/gatekeeper_ng_config.py b/scripts/slave/gatekeeper_ng_config.py
|
| index 75dc0cd75a5e1c720c1b3aa3d74e1694e9a4e50e..352f5efd5dd728a60a8cce46eb0bd244e664af5f 100755
|
| --- a/scripts/slave/gatekeeper_ng_config.py
|
| +++ b/scripts/slave/gatekeeper_ng_config.py
|
| @@ -247,15 +247,16 @@ def inject_hashes(gatekeeper_config):
|
| return new_config
|
|
|
|
|
| -def flatten_to_json(gatekeeper_config, stream):
|
| - # Python's sets aren't JSON-encodable, so we convert them to lists here.
|
| - class SetEncoder(json.JSONEncoder):
|
| - # pylint: disable=E0202
|
| - def default(self, obj):
|
| - if isinstance(obj, set):
|
| - return sorted(list(obj))
|
| - return json.JSONEncoder.default(self, obj)
|
| +# Python's sets aren't JSON-encodable, so we convert them to lists here.
|
| +class SetEncoder(json.JSONEncoder):
|
| + # pylint: disable=E0202
|
| + def default(self, obj):
|
| + if isinstance(obj, set):
|
| + return sorted(list(obj))
|
| + return json.JSONEncoder.default(self, obj)
|
| +
|
|
|
| +def flatten_to_json(gatekeeper_config, stream):
|
| json.dump(gatekeeper_config, stream, cls=SetEncoder, sort_keys=True)
|
|
|
|
|
|
|