Browse Source

Fix typos.

Jelmer Vernooij 16 năm trước cách đây
mục cha
commit
38cfa548ea
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 1
      dulwich/client.py
  2. 2 1
      dulwich/protocol.py

+ 1 - 1
dulwich/client.py

@@ -131,7 +131,7 @@ class GitClient(object):
 class TCPGitClient(GitClient):
 
     def __init__(self, host, port=TCP_GIT_PORT):
-        self._socket = socket.socket()
+        self._socket = socket.socket(type=socket.SOCK_STREAM)
         self._socket.connect((host, port))
         self.rfile = self._socket.makefile('rb', -1)
         self.wfile = self._socket.makefile('wb', 0)

+ 2 - 1
dulwich/protocol.py

@@ -35,6 +35,7 @@ class ProtocolFile(object):
     def close(self):
         pass
 
+
 class Protocol(object):
 
     def __init__(self, read, write):
@@ -95,7 +96,7 @@ class Protocol(object):
         :param cmd: The remote service to access
         :param args: List of arguments to send to remove service
         """
-        self.proto.write_pkt_line("%s %s" % (name, "".join(["%s\0" % a for a in args])))
+        self.write_pkt_line("%s %s" % (cmd, "".join(["%s\0" % a for a in args])))
 
     def read_cmd(self):
         """