| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ | |||
| 31 | 31 | from gitlab import utils # noqa | |
| 32 | 32 | ||
| 33 | 33 | __title__ = "python-gitlab" | |
| 34 | - __version__ = "1.12.0" | ||
| 34 | + __version__ = "1.12.1" | ||
| 35 | 35 | __author__ = "Gauvain Pocentek" | |
| 36 | 36 | __email__ = "gauvainpocentek@gmail.com" | |
| 37 | 37 | __license__ = "LGPL3" | |
@@ -350,13 +350,12 @@ def _construct_url(self, id_, obj, parameters, action=None): | |||
| 350 | 350 | return url | |
| 351 | 351 | ||
| 352 | 352 | def _set_auth_info(self): | |
| 353 | - if ( | ||
| 354 | - sum( | ||
| 355 | - bool(arg) | ||
| 356 | - for arg in [self.private_token, self.oauth_token, self.job_token] | ||
| 357 | - ) | ||
| 358 | - != 1 | ||
| 359 | - ): | ||
| 353 | + tokens = [ | ||
| 354 | + token | ||
| 355 | + for token in [self.private_token, self.oauth_token, self.job_token] | ||
| 356 | + if token | ||
| 357 | + ] | ||
| 358 | + if len(tokens) > 1: | ||
| 360 | 359 | raise ValueError( | |
| 361 | 360 | "Only one of private_token, oauth_token or job_token should " | |
| 362 | 361 | "be defined" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments