Browse Source

Only TCPGitClient cares about host

John Carr 16 năm trước cách đây
mục cha
commit
af6d609fad
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      dulwich/client.py

+ 3 - 3
dulwich/client.py

@@ -49,10 +49,9 @@ class GitClient(object):
 
     """
 
-    def __init__(self, fileno, read, write, host):
+    def __init__(self, fileno, read, write):
         self.proto = Protocol(read, write)
         self.fileno = fileno
-        self.host = host
 
     def capabilities(self):
         return "multi_ack side-band-64k thin-pack ofs-delta"
@@ -136,7 +135,8 @@ class TCPGitClient(GitClient):
         self._socket.connect((host, port))
         self.rfile = self._socket.makefile('rb', -1)
         self.wfile = self._socket.makefile('wb', 0)
-        super(TCPGitClient, self).__init__(self._socket.fileno(), self.rfile.read, self.wfile.write, host)
+        self.host = host
+        super(TCPGitClient, self).__init__(self._socket.fileno(), self.rfile.read, self.wfile.write)
 
     def send_pack(self, path):
         self.proto.send_cmd("git-receive-pack", path, "host=%s" % self.host)