Browse Source

Merge branch 'git-credentials-eol' of https://github.com/gracinet/dulwich

Jelmer Vernooij 4 years ago
parent
commit
684d14da70
2 changed files with 2 additions and 2 deletions
  1. 1 1
      dulwich/client.py
  2. 1 1
      dulwich/tests/test_client.py

+ 1 - 1
dulwich/client.py

@@ -1924,7 +1924,7 @@ def get_credentials_from_store(scheme, hostname, username=None,
         try:
             with open(fname, 'rb') as f:
                 for line in f:
-                    parsed_line = urlparse(line)
+                    parsed_line = urlparse(line.strip())
                     if (parsed_line.scheme == scheme and
                             parsed_line.hostname == hostname and
                             (username is None or

+ 1 - 1
dulwich/tests/test_client.py

@@ -1336,7 +1336,7 @@ class GitCredentialStoreTests(TestCase):
     @classmethod
     def setUpClass(cls):
         with tempfile.NamedTemporaryFile(delete=False) as f:
-            f.write(b'https://user:pass@example.org')
+            f.write(b'https://user:pass@example.org\n')
         cls.fname = f.name
 
     @classmethod