Skip to content

Commit 50a0301

Browse files
a-meynardnejch
authored andcommitted
feat: add keep_base_url when getting configuration from file
1 parent 44f05dc commit 50a0301

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gitlab/config.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def __init__(
108108
self.timeout: int = 60
109109
self.url: Optional[str] = None
110110
self.user_agent: str = USER_AGENT
111+
self.keep_base_url: bool = False
111112

112113
self._files = _get_config_files(config_files)
113114
if self._files:
@@ -235,6 +236,15 @@ def _parse_config(self) -> None:
235236
except _CONFIG_PARSER_ERRORS:
236237
pass
237238

239+
try:
240+
self.keep_base_url = _config.getboolean("global", "keep_base_url")
241+
except _CONFIG_PARSER_ERRORS:
242+
pass
243+
try:
244+
self.keep_base_url = _config.getboolean(self.gitlab_id, "keep_base_url")
245+
except _CONFIG_PARSER_ERRORS:
246+
pass
247+
238248
try:
239249
self.retry_transient_errors = _config.getboolean(
240250
"global", "retry_transient_errors"

0 commit comments

Comments
 (0)