(self, base_url_list, bt5_title)
return None
This method verify if the business template are available
        into one url (repository).
This method verify if the business template are available
        into one url (repository).
This method verify if the business template are available into one url ( repository ) .
def getBusinessTemplateUrl(self, base_url_list, bt5_title):
      """
        This method verify if the business template are available
        into one url (repository).
      """
      if base_url_list is None:
        base_url_list = self.getRepositoryList()
      # This list could be preconfigured at some properties or
      # at preferences.
      for base_url in base_url_list:
        url = "%s/%s" % (base_url, bt5_title)
        if base_url == "INSTANCE_HOME_REPOSITORY":
          url = "file://%s/bt5/%s" % (getConfiguration().instancehome,
                                      bt5_title)
          LOG('ERP5', INFO, "TemplateTool: INSTANCE_HOME_REPOSITORY is %s." \
              % url)
        try:
          urllib2.urlopen(url)
          return url
        except (urllib2.HTTPError, OSError):
          # XXX Try again with ".bt5" in case the folder format be used
          # Instead tgz one.
          url = "%s.bt5" % url
          try:
            urllib2.urlopen(url)
            return url
          except (urllib2.HTTPError, OSError):
            pass
      LOG('ERP5', INFO, 'TemplateTool: %s was not found into the url list: '
                        '%s.' % (bt5_title, base_url_list))
      return None
def getBusinessTemplateUrl ( self , base_url_list , bt5_title ) : if base_url_list is None : base_url_list = self . getRepositoryList ( ) # This list could be preconfigured at some properties or # at preferences. for base_url in base_url_list : url = "%s/%s" % ( base_url , bt5_title ) if base_url == "INSTANCE_HOME_REPOSITORY" : url = "file://%s/bt5/%s" % ( getConfiguration ( ) . instancehome , bt5_title ) LOG ( 'ERP5' , INFO , "TemplateTool: INSTANCE_HOME_REPOSITORY is %s." % url ) try : urllib2 . urlopen ( url ) return url except ( urllib2 . HTTPError , OSError ) : # XXX Try again with ".bt5" in case the folder format be used # Instead tgz one. url = "%s.bt5" % url try : urllib2 . urlopen ( url ) return url except ( urllib2 . HTTPError , OSError ) : pass LOG ( 'ERP5' , INFO , 'TemplateTool: %s was not found into the url list: ' '%s.' % ( bt5_title , base_url_list ) ) return None