Fix pygerrit2 compatibility

Change-Id: I973d1949e0a9881ba87685861ced1df46eed4db2
diff --git a/_modules/gerrit.py b/_modules/gerrit.py
index 0cb25c9..8eb22a0 100644
--- a/_modules/gerrit.py
+++ b/_modules/gerrit.py
@@ -44,9 +44,9 @@
 try:
     from gerritlib import gerrit
     try:
-        import pygerrit2.rest as pygerrit
+        from pygerrit2 import rest as pygerrit
     except ImportError:
-        import pygerrit.rest
+        from pygerrit import rest as pygerrit
     HAS_GERRIT = True
 except ImportError:
     pass
@@ -469,7 +469,7 @@
     else:
         raise Exception("Unknown auth_method %s" % auth_method)
 
-    gerrit = pygerrit.rest.GerritRestAPI(
+    gerrit = pygerrit.GerritRestAPI(
         url=url, auth=auth)
 
     return gerrit