summaryrefslogtreecommitdiff
path: root/gitlab/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/config.py')
-rw-r--r--gitlab/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitlab/config.py b/gitlab/config.py
index 3ef2efb..9af804d 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -88,3 +88,12 @@ class GitlabConfigParser(object):
'http_password')
except Exception:
pass
+
+ self.api_version = '3'
+ try:
+ self.api_version = self._config.get(self.gitlab_id, 'api_version')
+ except Exception:
+ pass
+ if self.api_version not in ('3', '4'):
+ raise GitlabDataError("Unsupported API version: %s" %
+ self.api_version)