Skip to content

Commit db2850a

Browse files
authored
Merge branch 'master' into patch-2
2 parents ca1c3e6 + 1ee666b commit db2850a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cwltool/main.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ def main(argsl=None, # type: List[str]
583583
make_fs_access=StdFsAccess, # type: Callable[[Text], StdFsAccess]
584584
fetcher_constructor=None, # type: Callable[[Dict[unicode, unicode], requests.sessions.Session], Fetcher]
585585
resolver=tool_resolver,
586-
logger_handler=None
586+
logger_handler=None,
587+
custom_schema_callback=None # type: Callable[[], None]
587588
):
588589
# type: (...) -> int
589590

@@ -625,7 +626,10 @@ def main(argsl=None, # type: List[str]
625626
'pack': False,
626627
'on_error': 'continue',
627628
'relax_path_checks': False,
628-
'validate': False}.iteritems():
629+
'validate': False,
630+
'enable_ga4gh_tool_registry': False,
631+
'ga4gh_tool_registries': []
632+
}.iteritems():
629633
if not hasattr(args, k):
630634
setattr(args, k, v)
631635

@@ -656,7 +660,9 @@ def main(argsl=None, # type: List[str]
656660
if not args.enable_ga4gh_tool_registry:
657661
del ga4gh_tool_registries[:]
658662

659-
if args.enable_ext:
663+
if custom_schema_callback:
664+
custom_schema_callback()
665+
elif args.enable_ext:
660666
res = pkg_resources.resource_stream(__name__, 'extensions.yml')
661667
use_custom_schema("v1.0", "http://commonwl.org/cwltool", res.read())
662668
res.close()

0 commit comments

Comments
 (0)