aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Bridon <[email protected]>2018-06-27 12:37:39 +0200
committerEric Engestrom <[email protected]>2018-07-05 12:52:38 +0100
commitf9b6dfd919f5ab2da8411e4d0fab3caf5ef7ad34 (patch)
tree190be0d2efc6b3ea8469c83ae6c80907fbb41800
parentfe8a153648f98c6dfbb621f31c212253c06f9467 (diff)
python: Specify the JSON separators
On Python 2, the default JSON separators are ', ' for items and ': ' for dicts. On Python 3, the default is the same when no indent is specified, but if one is (and we do specify one) then the default items separator becomes ',' (the dict separator remains unchanged). This change explicitly specifies the Python 3 default, which helps ensuring that the output is identical, whether it was generated by Python 2 or 3. Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r--src/amd/vulkan/radv_icd.py2
-rw-r--r--src/intel/vulkan/anv_icd.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_icd.py b/src/amd/vulkan/radv_icd.py
index 78ed379bd22..cc86bbfa56c 100644
--- a/src/amd/vulkan/radv_icd.py
+++ b/src/amd/vulkan/radv_icd.py
@@ -44,4 +44,4 @@ if __name__ == '__main__':
}
with open(args.out, 'w') as f:
- json.dump(json_data, f, indent = 4, sort_keys=True)
+ json.dump(json_data, f, indent = 4, sort_keys=True, separators=(',', ': '))
diff --git a/src/intel/vulkan/anv_icd.py b/src/intel/vulkan/anv_icd.py
index 31bb0687a8f..36c2882f7d6 100644
--- a/src/intel/vulkan/anv_icd.py
+++ b/src/intel/vulkan/anv_icd.py
@@ -44,4 +44,4 @@ if __name__ == '__main__':
}
with open(args.out, 'w') as f:
- json.dump(json_data, f, indent = 4, sort_keys=True)
+ json.dump(json_data, f, indent = 4, sort_keys=True, separators=(',', ': '))