Package list ctdconverter / fresh-snapshots/main debian / patches / py3_compat
fresh-snapshots/main

Tree @fresh-snapshots/main (Download .tar.gz)

py3_compat @fresh-snapshots/main

d76103f
 
ef0b785
 
d76103f
 
ef0b785
d76103f
 
 
 
 
 
 
 
ef0b785
d76103f
 
 
 
 
 
 
 
From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: use `open` instead of `file`
Index: ctdconverter/cwl/converter.py
===================================================================
--- ctdconverter.orig/cwl/converter.py
+++ ctdconverter/cwl/converter.py
@@ -72,7 +72,7 @@ def convert_models(args, parsed_ctds):
 
         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 @@ def convert_to_cwl(ctd_model, args):
         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: