소스 검색

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 년 전
부모
커밋
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,