Changeset 19570


Ignore:
Timestamp:
09/21/15 08:37:23 (10 years ago)
Author:
cborstad
Message:

CHG: analogous change for loading models saved with a name other than default

File:
1 edited

Legend:

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

    r19569 r19570  
    9898                if not isinstance(string,(str,unicode)):
    9999                        raise TypeError("argument provided is not a string")
    100                 path=os.path.join(self.repository,self.prefix+'.step#'+string+'.python')
     100                path1=os.path.join(self.repository,self.prefix+'.step#'+string+'.python')
     101                path2=os.path.join(self.repository,string)
    101102
    102103                #figure out if the model is there, otherwise, we have to use the default path supplied by user.
    103                 if whichdb(path):
    104                         md=loadmodel(path)
     104                if whichdb(path1):
     105                        md=loadmodel(path1)
    105106                        return md
     107                elif whichdb(path2):
     108                        md=loadmodel(path2)
     109                        return md
    106110
    107111                #If we are here, the model has not been found. Try trunk prefix if provided
     
    115119                                return md
    116120                else:
    117                         raise IOError("Could not find '%s'" % path)
     121                        raise IOError("Could not find '%s'" % path1)
    118122        #}}}
    119123        def perform(self,string):    # {{{
Note: See TracChangeset for help on using the changeset viewer.