Package list ctdconverter / ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main debian / patches / py3_compat
ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main

Tree @ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main (Download .tar.gz)

py3_compat @ea3e6862-d60e-433d-9df0-7a1cb727cf6e/mainraw · history · blame

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: