diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py
index 3fe95a2..43aeadc 100644
--- a/jeepyb/cmd/manage_projects.py
+++ b/jeepyb/cmd/manage_projects.py
@@ -219,25 +219,13 @@
                 time.sleep(1)
     else:
         global _gerrit_groups
-        if _gerrit_groups is None:
-            _gerrit_groups = {
-                group[0]: group[1]
-                for group in csv.reader(gerrit.listGroups(verbose=True),
-                                        delimiter='\t')
-            }
-        else:
-            if group not in _gerrit_groups:
-                try:
-                    # Relying on the outer Exception handler to deal with
-                    # the StopIteration when listGroup returns nothing
-                    # (for a system group).
-                    gdata = next(csv.reader(
-                        gerrit.listGroup(group, verbose=True),
-                        delimiter='\t'))
-                    _gerrit_groups[group] = gdata[1]
-                except Exception:
-                    # group not found will also trigger exception
-                    pass
+        if _gerrit_groups is not None and group in _gerrit_groups:
+            return _gerrit_groups.get(group, None)
+        _gerrit_groups = {
+            group[0]: group[1]
+            for group in csv.reader(gerrit.listGroups(verbose=True),
+                                    delimiter='\t')
+        }
         return _gerrit_groups.get(group, None)
     return None
 
