소스 검색

Strip newlines in hangup output.

Jelmer Vernooij 4 년 전
부모
커밋
e297ced7f5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      dulwich/client.py

+ 2 - 2
dulwich/client.py

@@ -751,8 +751,8 @@ def check_wants(wants, refs):
 def _remote_error_from_stderr(stderr):
     if stderr is None:
         raise HangupException()
-    lines = list(stderr.readlines())
-    for line in stderr.readlines():
+    lines = [line.rstrip(b'\n') for line in stderr.readlines()]
+    for line in lines:
         if line.startswith(b'ERROR: '):
             raise GitProtocolError(
                 line[len(b'ERROR: '):].decode('utf-8', 'replace'))