Avoid calling a method on a NoneType object (#30637)
This commit is contained in:
parent
63b6e484fc
commit
97ec8f1d19
1 changed files with 2 additions and 1 deletions
|
@ -478,11 +478,12 @@ def save_specfile_fn(args):
|
|||
if args.root_specfile:
|
||||
with open(args.root_specfile) as fd:
|
||||
root_spec_as_json = fd.read()
|
||||
spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json'
|
||||
else:
|
||||
root_spec = Spec(args.root_spec)
|
||||
root_spec.concretize()
|
||||
root_spec_as_json = root_spec.to_json(hash=ht.dag_hash)
|
||||
spec_format = 'yaml' if args.root_specfile.endswith('yaml') else 'json'
|
||||
spec_format = 'json'
|
||||
save_dependency_specfiles(
|
||||
root_spec_as_json, args.specfile_dir, args.specs.split(), spec_format)
|
||||
|
||||
|
|
Loading…
Reference in a new issue