]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Remove Some stray \t characters
authorKevin McCarthy <me@kevinmccarthy.org>
Sun, 10 Nov 2013 03:40:36 +0000 (17:40 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Sun, 10 Nov 2013 03:52:02 +0000 (17:52 -1000)
I guess that's what I get for playing around with my vimrc.

Thanks to @bryanhelmig for pointing these out.

vcr/stubs/__init__.py

index a97da73d1d0485514940d102f822bda63205d871..5132358a00a4635729be54b9942eee99fc7c43ca 100644 (file)
@@ -16,7 +16,7 @@ class VCRHTTPResponse(object):
         self.status = recorded_response['status']['code']
         self.version = None
         self._content = StringIO(self.recorded_response['body']['string'])
-       self.closed = False
+        self.closed = False
 
         # We are skipping the header parsing (they have already been parsed
         # at this point) and directly  adding the headers to the header
@@ -81,18 +81,18 @@ class VCRConnectionMixin:
 
     def close(self):
         self._restore_socket()
-       self._baseclass.close(self)
+        self._baseclass.close(self)
 
     def _restore_socket(self):
         """
-       Since some libraries (REQUESTS!!) decide to set options on
-       connection.socket, I need to delete the socket attribute
-       (which makes requests think this is a AppEngine connection)
-       and then restore it when I want to make the actual request.
-       This function restores it to its standard initial value
-       (which is None)
+        Since some libraries (REQUESTS!!) decide to set options on
+        connection.socket, I need to delete the socket attribute
+        (which makes requests think this is a AppEngine connection)
+        and then restore it when I want to make the actual request.
+        This function restores it to its standard initial value
+        (which is None)
         """
-       if not hasattr(self, 'sock'):
+        if not hasattr(self, 'sock'):
             self.sock = None
 
     def _send_request(self, method, url, body, headers):
@@ -150,7 +150,7 @@ class VCRConnectionMixin:
         if isinstance(message_body, str):
             msg += message_body
             message_body = None
-       self._restore_socket()
+        self._restore_socket()
         self._baseclass.send(self, msg)
         if message_body is not None:
             #message_body was not a string (i.e. it is a file) and
@@ -175,10 +175,10 @@ class VCRConnectionMixin:
             # Otherwise, we should send the request, then get the response
             # and return it.
 
-           # restore sock's value to None, since we need a real socket
-           self._restore_socket()
+           # restore sock's value to None, since we need a real socket
+            self._restore_socket()
 
-           #make the actual request
+            #make the actual request
             self._baseclass.request(
                 self,
                 method=self._vcr_request.method,
@@ -211,8 +211,8 @@ class VCRHTTPConnection(VCRConnectionMixin, HTTPConnection):
 
     def __init__(self, *args, **kwargs):
         HTTPConnection.__init__(self, *args, **kwargs)
-       # see VCRConnectionMixin._restore_socket for the motivation here
-       del self.sock
+        # see VCRConnectionMixin._restore_socket for the motivation here
+        del self.sock
 
 
 class VCRHTTPSConnection(VCRConnectionMixin, HTTPSConnection):
@@ -227,5 +227,5 @@ class VCRHTTPSConnection(VCRConnectionMixin, HTTPSConnection):
         HTTPConnection.__init__(self, *args, **kwargs)
         self.key_file = kwargs.pop('key_file', None)
         self.cert_file = kwargs.pop('cert_file', None)
-       # see VCRConnectionMixin._restore_socket for the motivation here
-       del self.sock
+        # see VCRConnectionMixin._restore_socket for the motivation here
+        del self.sock