diff --git a/pygerrit/client.py b/pygerrit/client.py
index <HASH>..<HASH> 100644
--- a/pygerrit/client.py
+++ b/pygerrit/client.py
@@ -76,10 +76,9 @@ class GerritClient(object):
                 data = decoder.decode(line)
             except ValueError, err:
                 raise GerritError("Query returned invalid data: %s", err)
-            if "type" in data:
-                if data["type"] == "error":
-                    raise GerritError("Query error: %s" % data["message"])
-            else:
+            if "type" in data and data["type"] == "error":
+                raise GerritError("Query error: %s" % data["message"])
+            elif "project" in data:
                 results.append(Change(data))
         return results
Only add query result lines to returned data

Only add JSON lines in the results if they contain "project".
Otherwise the "rowCount" line, and anything else, will be included
in the results as an empty Change object.

Change-Id: Ia4de4ed<I>c8f5ba<I>f5e<I>dd<I>ff<I>b<I>b<I>