From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: use `open` instead of `file`
--- ctdconverter.orig/cwl/converter.py
+++ ctdconverter/cwl/converter.py
@@ -72,7 +72,7 @@
logger.info("Writing to %s" % utils.get_filename(output_file), 1)
- stream = file(output_file, 'w')
+ stream = open(output_file, 'w')
stream.write(CWL_SHEBANG + '\n\n')
stream.write("# This CWL file was automatically generated using CTDConverter.\n")
stream.write("# Visit https://github.com/WorkflowConversion/CTDConverter for more information.\n\n")
@@ -103,6 +103,8 @@
param_name = utils.extract_param_name(param)
cwl_fixed_param_name = fix_param_name(param_name)
hardcoded_value = args.parameter_hardcoder.get_hardcoded_value(param_name, ctd_model.name)
+ if isinstance(param.default, map):
+ param.default = list(param.default)
param_default = str(param.default) if param.default is not _Null and param.default is not None else None
if param.type is _OutFile: