Преглед на файлове

Prevent server stack trace when the client request is a no-op.

The exception was not killing the server, just the connection, and was
technically correct since the server is supposed to close the connection
anyway when the client sends no wants. As a result, the compat tests
weren't failing.

A better long-term solution would be to modify the server used during
testing to stop serving if one request generates an exception.

Change-Id: I065463803f38175a50f364b11588929094a28aab
Dave Borowitz преди 15 години
родител
ревизия
8ff103de55
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      dulwich/repo.py

+ 2 - 0
dulwich/repo.py

@@ -684,6 +684,8 @@ class BaseRepo(object):
         :return: iterator over objects, with __len__ implemented
         """
         wants = determine_wants(self.get_refs())
+        if not wants:
+            return []
         haves = self.object_store.find_common_revisions(graph_walker)
         return self.object_store.iter_shas(
             self.object_store.find_missing_objects(haves, wants, progress,