Changeset 18471


Ignore:
Timestamp:
08/27/14 10:19:42 (11 years ago)
Author:
jbondzio
Message:

MINOR: enable to save models in python using a specific name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/organizer.py

    r17501 r18471  
    151151                return bool
    152152        #}}}
    153         def savemodel(self,md):    # {{{
     153        def savemodel(self,md, name='default'):    # {{{
    154154
    155155                #check
     
    159159                        raise RuntimeError("Cannot save model because organizer (org) is not up to date!")
    160160
    161                 name=os.path.join(self.repository,self.prefix+'.step#'+self.steps[self._currentstep-1]['string']+'.python')
     161                if (name=='default'):
     162                        name=os.path.join(self.repository,self.prefix+'.step#'+self.steps[self._currentstep-1]['string']+'.python')
    162163                print "saving model as: '%s'" % name
    163164
Note: See TracChangeset for help on using the changeset viewer.