packages.srcinfo_cache: make dumped json more human-readable with indent=2

This commit is contained in:
InsanePrawn 2022-09-19 02:53:00 +02:00
parent eb63a6869a
commit 6b613287bf

View file

@ -153,7 +153,7 @@ class SrcinfoMetaFile(DataClass):
def toJSON(self) -> str:
'Returns a json representation, with private keys that start with "_" filtered out'
return json.dumps({key: val for key, val in self.toDict().items() if not key.startswith('_')})
return json.dumps({key: val for key, val in self.toDict().items() if not key.startswith('_')}, indent=2)
def write(self):
'Write the filtered json representation to disk as srcinfo_meta.json'