2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
33943411dc
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,