add json and yaml components
This commit is contained in:
parent
e47ca962af
commit
412a7ab089
@ -988,10 +988,10 @@ class RepoSync:
|
||||
Shared.write_metadata(
|
||||
self.timestamp,
|
||||
self.date_stamp,
|
||||
self.fullname,
|
||||
self.distname,
|
||||
self.fullversion,
|
||||
self.compose_id,
|
||||
metadata_dir + 'metadata.json'
|
||||
metadata_dir + '/metadata'
|
||||
)
|
||||
|
||||
self.log.info(
|
||||
|
@ -3,6 +3,7 @@
|
||||
import os
|
||||
import json
|
||||
import hashlib
|
||||
import yaml
|
||||
import productmd.treeinfo
|
||||
|
||||
class ArchCheck:
|
||||
@ -136,9 +137,13 @@ class Shared:
|
||||
}
|
||||
}
|
||||
|
||||
with open(file_path, "w+") as f:
|
||||
json.dump(metadata, f)
|
||||
f.close()
|
||||
with open(file_path + ".json", "w+") as fp:
|
||||
json.dump(metadata, fp, indent=4)
|
||||
fp.close()
|
||||
|
||||
with open(file_path + ".yaml", "w+") as yp:
|
||||
yaml.dump(metadata, yp)
|
||||
yp.close()
|
||||
|
||||
@staticmethod
|
||||
def discinfo_write(timestamp, fullname, arch, file_path):
|
||||
|
Loading…
Reference in New Issue
Block a user