parameters: (self, name, readonly=False)
return_statement: return Addon(self, name, readonly)
docstring: Returns an add-on object for the given name.
  
          name: Name of the add-on.
          readonly: If set, and the add-on needs to be freshly cloned, use a read-only protocol
  
          Raises libgithub.Error if no such add-on exists.
docstring_summary: Returns an add-on object for the given name.
docstring_tokens: Returns an add - on object for the given name .
function: def addon(self, name, readonly=False):
          """Returns an add-on object for the given name.
  
          name: Name of the add-on.
          readonly: If set, and the add-on needs to be freshly cloned, use a read-only protocol
  
          Raises libgithub.Error if no such add-on exists.
          """
          logging.debug("Generating add-on object for {0}".format(name))
          if not os.path.isdir(self._absolute_path(name)):
              logging.debug("Add-on {0} not found locally, checking github.".format(name))
              github_list = self._github_repos_list(readonly=readonly)
              matches = [x for x in github_list if x[0] == name]
              if matches:
                  repo = matches[0]
                  self._clone(repo[0], repo[1])
              else:
                  raise AddonError(name, "Add-on not found")
          return Addon(self, name, readonly)
function_tokens: def addon ( self , name , readonly = False ) : logging . debug ( "Generating add-on object for {0}" . format ( name ) ) if not os . path . isdir ( self . _absolute_path ( name ) ) : logging . debug ( "Add-on {0} not found locally, checking github." . format ( name ) ) github_list = self . _github_repos_list ( readonly = readonly ) matches = [ x for x in github_list if x [ 0 ] == name ] if matches : repo = matches [ 0 ] self . _clone ( repo [ 0 ] , repo [ 1 ] ) else : raise AddonError ( name , "Add-on not found" ) return Addon ( self , name , readonly )