summaryrefslogtreecommitdiff
path: root/gitlab/config.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-02-04 07:02:55 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2018-02-04 07:02:55 +0100
commit29bd81336828b72a47673c76862cb4b532401766 (patch)
tree52217512d337e8dbb4f2a5671a0d099b3ae9a8e9 /gitlab/config.py
parent1ca30807566ca3ac1bd295516a122cd75ba9031f (diff)
downloadgitlab-29bd81336828b72a47673c76862cb4b532401766.tar.gz
config: support api_version in the global section
Fixes #421
Diffstat (limited to 'gitlab/config.py')
-rw-r--r--gitlab/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/config.py b/gitlab/config.py
index 9cf208c..3166ec4 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -130,6 +130,10 @@ class GitlabConfigParser(object):
self.api_version = '3'
try:
+ self.api_version = self._config.get('global', 'api_version')
+ except Exception:
+ pass
+ try:
self.api_version = self._config.get(self.gitlab_id, 'api_version')
except Exception:
pass