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