summaryrefslogtreecommitdiff
path: root/gitlab/config.py
diff options
context:
space:
mode:
authorKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-07 15:56:36 +0100
committerKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-07 15:56:36 +0100
commit9dfb4cd97e6eb5bbfc29935cbb190b70b739cf9f (patch)
tree21f8f5b87e98f3c3efb8dd2140e1bc9b01943c48 /gitlab/config.py
parent3ac6fa12b37dd33610ef2206ef4ddc3b20d9fd3f (diff)
downloadgitlab-9dfb4cd97e6eb5bbfc29935cbb190b70b739cf9f.tar.gz
fix: handling config value in _get_values_from_helper
Diffstat (limited to 'gitlab/config.py')
-rw-r--r--gitlab/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitlab/config.py b/gitlab/config.py
index d2cdbfd..f3fea4f 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -204,8 +204,10 @@ class GitlabConfigParser(object):
"""Update attributes, which may get values from an external helper program"""
for attr in HELPER_ATTRIBUTES:
value = getattr(self, attr)
- _value_lower = value.lower().strip()
- if isinstance(value, str) and _value_lower.startswith(HELPER_PREFIX):
+ if not isinstance(value, str):
+ continue
+
+ if value.lower().strip().startswith(HELPER_PREFIX):
helper = expanduser(value[len(HELPER_PREFIX) :].strip())
value = subprocess.check_output([helper]).decode("utf-8").strip()
setattr(self, attr, value) \ No newline at end of file