Ignore:
Timestamp:
23/12/08 00:55:49 (12 years ago)
Author:
astephen
Message:

More fixes to nappy to get all DCIP stuff writing properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/nc_interface/nc_to_na.py

    r4699 r4700  
    193193                            comments_list = new_item[:] 
    194194                        elif comment_override_rule in ("insert", "extend"): 
     195                            new_comments = new_item[:] 
     196                            existing_comments = this_na_dict.get(key, []) 
    195197                            comments_list = self._cleanWrapComments(existing_comments, new_comments, key, comment_override_rule) 
    196198                        else: 
     
    198200 
    199201                        """elif comment_override_rule == "insert": 
    200                             new_comments = new_items[:] 
     202                            new_comments = new_item[:] 
    201203                            existing_comments = this_na_dict.get(key, []) 
    202204                            comments_list = self._cleanWrapComments(existing_comments, new_comments, key, comment_override_rule) 
     
    231233            # If not having to split file into multiple outputs (normal condition) 
    232234            else:                
     235                print "LLLLLLLLLLLLLLLLLLLLLLLLLLLL", file_name 
    233236                x = nappy.openNAFile(file_name, 'w', this_na_dict) 
    234237                x.write(delimiter=delimiter, float_format=float_format, annotation=annotation) 
     
    370373        Returns a new list of combined_comments. 
    371374        """ 
     375        if existing_comments == []:   return new_comments 
     376        if new_comments == []:        return existing_comments 
     377 
    372378        # Strip start header if used 
    373379        c1 = key[0].lower() 
Note: See TracChangeset for help on using the changeset viewer.