summaryrefslogtreecommitdiff
path: root/gitlab/config.py
diff options
context:
space:
mode:
authorKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-07 15:39:19 +0100
committerKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-07 15:39:19 +0100
commitb5f43c83b25271f7aff917a9ce8826d39ff94034 (patch)
treea99e0f242a59886430fad5873581689633ba8118 /gitlab/config.py
parent732e49c6547c181de8cc56e93b30dc399e87091d (diff)
downloadgitlab-b5f43c83b25271f7aff917a9ce8826d39ff94034.tar.gz
chore: make lint happy
Diffstat (limited to 'gitlab/config.py')
-rw-r--r--gitlab/config.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/gitlab/config.py b/gitlab/config.py
index 67f5082..09732bb 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -36,9 +36,7 @@ _DEFAULT_FILES: List[str] = _env_config() + [
HELPER_PREFIX = "helper:"
-HELPER_ATTRIBUTES = [
- "job_token", "http_password", "private_token", "oauth_token"
-]
+HELPER_ATTRIBUTES = ["job_token", "http_password", "private_token", "oauth_token"]
class ConfigError(Exception):
pass
@@ -202,11 +200,11 @@ class GitlabConfigParser(object):
pass
def _get_values_from_helper(self):
- """Update attributes, which may get values from an external helper program
- """
+ """Update attributes, which may get values from an external helper program"""
for attr in HELPER_ATTRIBUTES:
value = getattr(self, attr)
- if isinstance(value, str) and value.lower().strip().startswith(HELPER_PREFIX):
+ _value_lower = value.lower().strip()
+ if isinstance(value, str) and _value_lower.startswith(HELPER_PREFIX):
helper = value[len(HELPER_PREFIX) :].strip()
value = subprocess.check_output([helper]).decode("utf-8").strip()
setattr(self, attr, value) \ No newline at end of file