Skip to content

Commit d55f6e0

Browse files
author
Peter Amstutz
committed
Allow "metadata" kwarg to be optional.
1 parent 3af8ca3 commit d55f6e0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cwltool/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
103103
default="turtle")
104104

105105
parser.add_argument("--eval-timeout",
106-
help="Time to wait for a Javascript expression to evaluate before giving an error.",
107-
type=float)
106+
help="Time to wait for a Javascript expression to evaluate before giving an error, default 20s.",
107+
type=float,
108+
default=20)
108109

109110
exgroup = parser.add_mutually_exclusive_group()
110111
exgroup.add_argument("--print-rdf", action="store_true",

cwltool/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class Process(object):
228228

229229
def __init__(self, toolpath_object, **kwargs):
230230
# type: (Dict[str, Any], **Any) -> None
231-
self.metadata = kwargs["metadata"] # type: Dict[str,Any]
231+
self.metadata = kwargs.get("metadata", {}) # type: Dict[str,Any]
232232
self.names = None # type: avro.schema.Names
233233
names = schema_salad.schema.make_avro_schema(
234234
[SCHEMA_FILE, SCHEMA_ANY], schema_salad.ref_resolver.Loader({}))[0]

0 commit comments

Comments
 (0)