From: Diane Trout Date: Mon, 19 Sep 2011 18:58:17 +0000 (-0700) Subject: Python 2.6's DictWriter doesn't have writeheader, so fake it with join. X-Git-Tag: v0.5.5~92 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=bea8ab9beff9c070408bf1e1268979884850a2c4 Python 2.6's DictWriter doesn't have writeheader, so fake it with join. --- diff --git a/htsworkflow/pipelines/retrieve_config.py b/htsworkflow/pipelines/retrieve_config.py index 888da7d..7427924 100644 --- a/htsworkflow/pipelines/retrieve_config.py +++ b/htsworkflow/pipelines/retrieve_config.py @@ -352,7 +352,7 @@ def save_sample_sheet(outstream, options, flowcell_info): 'Recipe': format_recipe_name, 'Operator': format_operator_name} out = csv.DictWriter(outstream, sample_sheet_fields) - out.writeheader() + outstream.write(','.join(sample_sheet_fields)) for lane_number in LANE_LIST: lane_contents = flowcell_info['lane_set'][str(lane_number)]