Skip to content

Commit 9dfb4cd

Browse files
committed
fix: handling config value in _get_values_from_helper
1 parent 3ac6fa1 commit 9dfb4cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitlab/config.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ def _get_values_from_helper(self):
204204
"""Update attributes, which may get values from an external helper program"""
205205
for attr in HELPER_ATTRIBUTES:
206206
value = getattr(self, attr)
207-
_value_lower = value.lower().strip()
208-
if isinstance(value, str) and _value_lower.startswith(HELPER_PREFIX):
207+
if not isinstance(value, str):
208+
continue
209+
210+
if value.lower().strip().startswith(HELPER_PREFIX):
209211
helper = expanduser(value[len(HELPER_PREFIX) :].strip())
210212
value = subprocess.check_output([helper]).decode("utf-8").strip()
211213
setattr(self, attr, value)

0 commit comments

Comments
 (0)