Fix virtual function
diff --git a/_modules/gerrit.py b/_modules/gerrit.py
index db3cdcb..8db9e4a 100644
--- a/_modules/gerrit.py
+++ b/_modules/gerrit.py
@@ -35,8 +35,6 @@
 import logging
 import os
 import urllib
-
-import pygerrit.rest
 import requests.auth
 
 LOG = logging.getLogger(__name__)
@@ -45,6 +43,7 @@
 HAS_GERRIT = False
 try:
     from gerritlib import gerrit
+    import pygerrit.rest
     HAS_GERRIT = True
 except ImportError:
     pass