Ubuntu Pastebin

Paste from vila at Sat, 26 Nov 2016 18:16:41 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
=== modified file 'bzrlib/tests/test_http.py'
--- bzrlib/tests/test_http.py	2016-02-01 18:06:32 +0000
+++ bzrlib/tests/test_http.py	2016-11-26 18:07:08 +0000
@@ -1273,6 +1273,8 @@
             self.no_proxy_host = self.server_host_port
         # The secondary server is the proxy
         self.proxy_url = self.get_secondary_url()
+        if self._testing_pycurl():
+            self.proxy_url = self.proxy_url.replace('+pycurl', '')
 
     def _testing_pycurl(self):
         # TODO: This is duplicated for lots of the classes in this file
@@ -1853,7 +1855,10 @@
                                   ])
 
     def get_user_transport(self, user, password):
-        self.overrideEnv('all_proxy', self.get_user_url(user, password))
+        proxy_url = self.get_user_url(user, password)
+        if self._testing_pycurl():
+            proxy_url = proxy_url.replace('+pycurl', '')
+        self.overrideEnv('all_proxy', proxy_url)
         return TestAuth.get_user_transport(self, user, password)
 
     def test_empty_pass(self):

=== modified file 'bzrlib/transport/http/_pycurl.py'
--- bzrlib/transport/http/_pycurl.py	2011-12-19 13:23:58 +0000
+++ bzrlib/transport/http/_pycurl.py	2016-11-26 18:10:48 +0000
@@ -85,6 +85,9 @@
     """
     return pycurl.__dict__.get(symbol, default)
 
+# Yes, weird but returned on weird http error (invalid status line)
+CURLE_FTP_WEIRD_SERVER_REPLY = _get_pycurl_errcode(
+    'E_FTP_WEIRD_SERVER_REPLY', 8)
 CURLE_COULDNT_CONNECT = _get_pycurl_errcode('E_COULDNT_CONNECT', 7)
 CURLE_COULDNT_RESOLVE_HOST = _get_pycurl_errcode('E_COULDNT_RESOLVE_HOST', 6)
 CURLE_COULDNT_RESOLVE_PROXY = _get_pycurl_errcode('E_COULDNT_RESOLVE_PROXY', 5)
@@ -397,6 +400,7 @@
             if e[0] in (CURLE_COULDNT_RESOLVE_HOST,
                         CURLE_COULDNT_RESOLVE_PROXY,
                         CURLE_COULDNT_CONNECT,
+                        CURLE_FTP_WEIRD_SERVER_REPLY,
                         CURLE_GOT_NOTHING,
                         CURLE_SSL_CACERT,
                         CURLE_SSL_CACERT_BADFILE,
Download as text