commit | e8ce1f8472fda12653f1da814ef7f400f4d8692c | [log] [tgz] |
---|---|---|
author | Filip Pytloun <filip@pytloun.cz> | Wed Jan 10 13:41:12 2018 +0100 |
committer | Filip Pytloun <filip@pytloun.cz> | Wed Jan 10 13:41:57 2018 +0100 |
tree | 37f74084ac71a9dbb5c5c24f22664f2f26dd2ac7 | |
parent | 09765e11474ae9cdcaf8493170656df8cc6f3364 [diff] [blame] |
Try to use pygerrit2 if it's available Change-Id: I0fc5b8f3700a94cc431daf8fc4075ba330276871
diff --git a/_modules/gerrit.py b/_modules/gerrit.py index 8a23a01..0cb25c9 100644 --- a/_modules/gerrit.py +++ b/_modules/gerrit.py
@@ -43,7 +43,10 @@ HAS_GERRIT = False try: from gerritlib import gerrit - import pygerrit.rest + try: + import pygerrit2.rest as pygerrit + except ImportError: + import pygerrit.rest HAS_GERRIT = True except ImportError: pass