(self)
Record new PATH after modifications
Record new PATH after modifications
Record new PATH after modifications
def rebuild_path(self):
        '''
        Record new PATH after modifications
        '''

        if self.type == 'path':
            if self.folder_version:
                # Replace FOLDER VERSION in location with a new version
                location = self.location
                self.location = '{0}{1}'.format(location[:-3], self.folder_version)

            self.path = '{0}/{1}_{2}.{3}'.format(self.location, self.code, self.file_version, self.extension)

        if self.type == 'sequence':
            self.path = '{0}/{1}_{2}.{3}.{4}'.format(self.location, self.code, self.file_version, self.sequence_token, self.extension)

        if self.type == 'location':
            self.path = '{0}/{1}'.format(self.location, self.folder_version)
def rebuild_path ( self ) : if self . type == 'path' : if self . folder_version : # Replace FOLDER VERSION in location with a new version location = self . location self . location = '{0}{1}' . format ( location [ : - 3 ] , self . folder_version ) self . path = '{0}/{1}_{2}.{3}' . format ( self . location , self . code , self . file_version , self . extension ) if self . type == 'sequence' : self . path = '{0}/{1}_{2}.{3}.{4}' . format ( self . location , self . code , self . file_version , self . sequence_token , self . extension ) if self . type == 'location' : self . path = '{0}/{1}' . format ( self . location , self . folder_version )