changed some comments, corrected one indent
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 8 Jun 2016 15:46:02 +0000 (17:46 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 15 Jun 2016 11:18:02 +0000 (13:18 +0200)
deltatar/tarfile.py

index 729079f..ad52e41 100644 (file)
@@ -543,8 +543,9 @@ class _Stream:
         self.__write(s)
 
     def __write(self, s):
-        """Write string s to the stream if a whole new block
-           is ready to be written.
+        """Writes (and encodes) string s to the stream blockwise
+
+        will wait with encoding/writing until block is complete
         """
         self.buf += s
         while len(self.buf) > self.bufsize:
@@ -1721,7 +1722,7 @@ class TarFile(object):
     def __init__(self, name=None, mode="r", fileobj=None, format=None,
             tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
             errors="surrogateescape", pax_headers=None, debug=None,
-             errorlevel=None, max_volume_size=None, new_volume_handler=None,
+            errorlevel=None, max_volume_size=None, new_volume_handler=None,
             concat_compression=False, password='', save_to_members=True):
         """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
            read from an existing archive, 'a' to append data to an existing
@@ -1970,7 +1971,7 @@ class TarFile(object):
             stream = _Stream(name, filemode, comptype, fileobj, bufsize,
                              concat_stream=True, enctype=enctype,
                              password=password, key_length=key_length,
-                            compresslevel=compresslevel)
+                             compresslevel=compresslevel)
             try:
                 t = cls(name, filemode, stream, **kwargs)
             except: