Browse Source

Call the parent class constructor, not grandparent's, to avoid surprises later
if the class hierarchy is changed.

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

+ 3 - 3
dulwich/client.py

@@ -303,7 +303,7 @@ class TCPGitClient(TraditionalGitClient):
             port = TCP_GIT_PORT
         self._host = host
         self._port = port
-        GitClient.__init__(self, *args, **kwargs)
+        TraditionalGitClient.__init__(self, *args, **kwargs)
 
     def _connect(self, cmd, path):
         sockaddrs = socket.getaddrinfo(self._host, self._port,
@@ -362,7 +362,7 @@ class SubprocessGitClient(TraditionalGitClient):
 
     def __init__(self, *args, **kwargs):
         self._connection = None
-        GitClient.__init__(self, *args, **kwargs)
+        TraditionalGitClient.__init__(self, *args, **kwargs)
 
     def _connect(self, service, path):
         import subprocess
@@ -400,7 +400,7 @@ class SSHGitClient(TraditionalGitClient):
         self.host = host
         self.port = port
         self.username = username
-        GitClient.__init__(self, *args, **kwargs)
+        TraditionalGitClient.__init__(self, *args, **kwargs)
         self.alternative_paths = {}
 
     def _get_cmd_path(self, cmd):