source: issm/oecreview/Archive/19101-20495/ISSM-19569-19570.diff

Last change on this file was 20498, checked in by Mathieu Morlighem, 9 years ago

CHG: done with Archive/19101-20495

File size: 1.2 KB
  • ../trunk-jpl/src/m/classes/organizer.py

     
    9797                #Get model path
    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
    108112                if self.trunkprefix:
     
    114118                                md=loadmodel(path2)
    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):    # {{{
    120124
Note: See TracBrowser for help on using the repository browser.