mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Fix tool-shed-config-validate
This commit is contained in:
@@ -397,15 +397,14 @@ def _lint(args, app_desc):
|
||||
|
||||
def _validate(args, app_desc):
|
||||
path = _find_config(args, app_desc)
|
||||
with open(path, "r") as f:
|
||||
# Allow empty mapping (not allowed by pykawlify)
|
||||
raw_config = _order_load_path(f)
|
||||
if raw_config.get(app_desc.app_name, None) is None:
|
||||
raw_config[app_desc.app_name] = {}
|
||||
config_p = tempfile.NamedTemporaryFile(delete=False, suffix=".yml")
|
||||
_ordered_dump(raw_config, config_p)
|
||||
config_p.flush()
|
||||
path = config_p.name
|
||||
# Allow empty mapping (not allowed by pykawlify)
|
||||
raw_config = _order_load_path(path)
|
||||
if raw_config.get(app_desc.app_name, None) is None:
|
||||
raw_config[app_desc.app_name] = {}
|
||||
config_p = tempfile.NamedTemporaryFile(delete=False, suffix=".yml")
|
||||
_ordered_dump(raw_config, config_p)
|
||||
config_p.flush()
|
||||
path = config_p.name
|
||||
|
||||
fp = tempfile.NamedTemporaryFile(delete=False, suffix=".yml")
|
||||
_ordered_dump(app_desc.schema.raw_schema, fp)
|
||||
|
||||
Reference in New Issue
Block a user