gerrit.utils package
Submodules
gerrit.utils.common module
gerrit.utils.exceptions module
Module for custom exceptions.
Where possible we try to throw exceptions with non-generic, meaningful names.
- exception gerrit.utils.exceptions.AccountAlreadyExistsError[source]
Bases:
GerritAPIException
Account already exists
- exception gerrit.utils.exceptions.AccountEmailAlreadyExistsError[source]
Bases:
GerritAPIException
Account Email already exists
- exception gerrit.utils.exceptions.AccountEmailNotFoundError[source]
Bases:
GerritAPIException
Account Email cannot be found
- exception gerrit.utils.exceptions.AccountNotFoundError[source]
Bases:
GerritAPIException
Account cannot be found
- exception gerrit.utils.exceptions.AuthError[source]
Bases:
GerritAPIException
403 Forbidden is returned if the operation is not allowed because the calling user does not have sufficient permissions.
- exception gerrit.utils.exceptions.BranchAlreadyExistsError[source]
Bases:
GerritAPIException
Branch already exists
- exception gerrit.utils.exceptions.BranchNotFoundError[source]
Bases:
GerritAPIException
Branch cannot be found
- exception gerrit.utils.exceptions.ChangeEditNotFoundError[source]
Bases:
GerritAPIException
Change edit cannot be found
- exception gerrit.utils.exceptions.ChangeNotFoundError[source]
Bases:
GerritAPIException
Change cannot be found
- exception gerrit.utils.exceptions.ClientError[source]
Bases:
GerritAPIException
Client Error
- exception gerrit.utils.exceptions.CommitNotFoundError[source]
Bases:
GerritAPIException
Commit cannot be found
- exception gerrit.utils.exceptions.ConflictError[source]
Bases:
GerritAPIException
409 Conflict is returned if the request cannot be completed because the current state of the resource doesn’t allow the operation.
- exception gerrit.utils.exceptions.FileContentNotFoundError[source]
Bases:
GerritAPIException
File content not found
- exception gerrit.utils.exceptions.GPGKeyNotFoundError[source]
Bases:
GerritAPIException
GPG key cannot be found
- exception gerrit.utils.exceptions.GerritAPIException[source]
Bases:
Exception
Base class for all errors
- exception gerrit.utils.exceptions.GroupAlreadyExistsError[source]
Bases:
GerritAPIException
Group already exists
- exception gerrit.utils.exceptions.GroupMemberAlreadyExistsError[source]
Bases:
GerritAPIException
Group member already exists
- exception gerrit.utils.exceptions.GroupMemberNotFoundError[source]
Bases:
GerritAPIException
Group member cannot be found
- exception gerrit.utils.exceptions.GroupNotFoundError[source]
Bases:
GerritAPIException
Group cannot be found
- exception gerrit.utils.exceptions.NotAllowedError[source]
Bases:
GerritAPIException
405 Method Not Allowed is returned if the resource exists but doesn’t support the operation.
- exception gerrit.utils.exceptions.NotFoundError[source]
Bases:
GerritAPIException
Resource cannot be found
- exception gerrit.utils.exceptions.ProjectAlreadyExistsError[source]
Bases:
GerritAPIException
Project already exists
- exception gerrit.utils.exceptions.ProjectNotFoundError[source]
Bases:
GerritAPIException
Project cannot be found
- exception gerrit.utils.exceptions.ReviewerAlreadyExistsError[source]
Bases:
GerritAPIException
Reviewer already exists
- exception gerrit.utils.exceptions.ReviewerNotFoundError[source]
Bases:
GerritAPIException
Reviewer cannot be found
- exception gerrit.utils.exceptions.SSHKeyNotFoundError[source]
Bases:
GerritAPIException
SSH key cannot be found
- exception gerrit.utils.exceptions.ServerError[source]
Bases:
GerritAPIException
Server Error
- exception gerrit.utils.exceptions.TagAlreadyExistsError[source]
Bases:
GerritAPIException
Tag already exists
- exception gerrit.utils.exceptions.TagNotFoundError[source]
Bases:
GerritAPIException
Tag cannot be found
- exception gerrit.utils.exceptions.UnauthorizedError[source]
Bases:
GerritAPIException
401 Unauthorized
- exception gerrit.utils.exceptions.UnknownBranch[source]
Bases:
KeyError
,NotFoundError
Gerrit does not recognize the branch requested.
- exception gerrit.utils.exceptions.UnknownFile[source]
Bases:
KeyError
,NotFoundError
Gerrit does not recognize the revision file requested.
- exception gerrit.utils.exceptions.UnknownTag[source]
Bases:
KeyError
,NotFoundError
Gerrit does not recognize the tag requested.
- exception gerrit.utils.exceptions.ValidationError[source]
Bases:
GerritAPIException
400 Bad Request is returned if the request is not understood by the server due to malformed syntax. E.g. 400 Bad Request is returned if JSON input is expected but the ‘Content-Type’ of the request
is not ‘application/json’ or the request body doesn’t contain valid JSON.
400 Bad Request is also returned if required input fields are not set or if options are set which cannot be used together.
gerrit.utils.gerritbase module
gerrit.utils.requester module
- class gerrit.utils.requester.Requester(**kwargs)[source]
Bases:
object
A class which carries out HTTP requests. You can replace this class with one of your own implementation if you require some other way to access Gerrit. This default class can handle simple authentication only.
- AUTH_COOKIE = None
- VALID_STATUS_CODES = [200]
- delete(url, headers=None, allow_redirects=True, raise_for_status: bool = True, **kwargs)[source]
- Parameters:
url –
headers –
allow_redirects –
raise_for_status –
kwargs –
- Returns:
- get(url, params=None, headers=None, allow_redirects=True, stream=False, raise_for_status: bool = True, **kwargs)[source]
- Parameters:
url –
params –
headers –
allow_redirects –
stream –
raise_for_status –
kwargs –
- Returns:
- get_request_dict(params=None, data=None, json=None, headers=None, **kwargs)[source]
- Parameters:
params –
data –
json –
headers –
kwargs –
- Returns: