mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
json: factor handling of deprecated 'base'
This commit is contained in:
parent
20d4712815
commit
a792bc5456
@ -32,4 +32,7 @@ def load(description_path):
|
||||
global validator
|
||||
validator.validate(result)
|
||||
|
||||
if result["base"] != "use_drtio_role":
|
||||
result["drtio_role"] = result["base"]
|
||||
|
||||
return result
|
||||
|
@ -687,14 +687,10 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
primary_description = jsondesc.load(args.primary_description)
|
||||
if primary_description["base"] != "use_drtio_role":
|
||||
primary_description["drtio_role"] = primary_description["base"]
|
||||
|
||||
satellites = []
|
||||
for destination, description_path in args.satellite:
|
||||
satellite_description = jsondesc.load(description_path)
|
||||
if satellite_description["base"] != "use_drtio_role":
|
||||
satellite_description["drtio_role"] = satellite_description["base"]
|
||||
satellites.append((int(destination, 0), satellite_description))
|
||||
|
||||
if args.output is not None:
|
||||
|
@ -150,8 +150,6 @@ def main():
|
||||
help="Override ROM identifier")
|
||||
args = parser.parse_args()
|
||||
description = jsondesc.load(args.description)
|
||||
if description["base"] != "use_drtio_role":
|
||||
description["drtio_role"] = description["base"]
|
||||
|
||||
min_artiq_version = description.get("min_artiq_version", "0")
|
||||
if Version(artiq_version) < Version(min_artiq_version):
|
||||
|
Loading…
Reference in New Issue
Block a user