Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions gitlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from gitlab import utils # noqa

__title__ = "python-gitlab"
__version__ = "1.12.0"
__version__ = "1.12.1"
__author__ = "Gauvain Pocentek"
__email__ = "gauvainpocentek@gmail.com"
__license__ = "LGPL3"
Expand Down Expand Up @@ -350,13 +350,12 @@ def _construct_url(self, id_, obj, parameters, action=None):
return url

def _set_auth_info(self):
if (
sum(
bool(arg)
for arg in [self.private_token, self.oauth_token, self.job_token]
)
!= 1
):
tokens = [
token
for token in [self.private_token, self.oauth_token, self.job_token]
if token
]
if len(tokens) > 1:
raise ValueError(
"Only one of private_token, oauth_token or job_token should "
"be defined"
Expand Down