Changeset 4679 for MILK


Ignore:
Timestamp:
18/12/08 12:31:06 (11 years ago)
Author:
cbyrom
Message:

Extend granulite to allow command line operation - with input options
to specify logging level and 'replace atom' mode - which command line
inputs to ask users if they want to replace duplicated data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4678 r4679  
    119119        replaceAtom = inputs.get('replaceAtom') 
    120120         
     121        # NB, need to turn from string to boolean - there doesn't seem a reliable 
     122        # way of doing this using built in methods - so just do simple check 
     123        if replaceAtom == 'True': 
     124            replaceAtom = True 
     125        else: 
     126            replaceAtom = False 
     127         
    121128        # if this is true, then re-extract the inputs from the session data 
    122         if replaceAtom == 'True': 
     129        if replaceAtom: 
    123130            if session.get(GRAN_FILE_VALUE): 
    124131                granFile = cgi.FieldStorage() 
     
    170177                                 timeAxis = inputs.get('timeAxis'), \ 
    171178                                 datasetID = inputs.get('datasetID'), \ 
    172                                  useCSMLID = useCSMLID) 
     179                                 useCSMLID = useCSMLID, \ 
     180                                 replaceAtom = replaceAtom) 
    173181 
    174182                # now process the input file and add any extra required data 
     
    181189                else: 
    182190                    try: 
    183                         c.atom = gran.processGranulite(replaceAtom = replaceAtom) 
     191                        c.atom = gran.processGranulite() 
    184192 
    185193                        # Now set up the ndgObject with the created atom's vals 
Note: See TracChangeset for help on using the changeset viewer.