diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-13 18:46:49 +0100 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-13 18:46:49 +0100 |
| commit | 8ae4e9579a263684c6b760aec2869be480ff22ba (patch) | |
| tree | f0f3344ffb385a6d3202087a5cdebb7589792e37 /gitdb/stream.py | |
| parent | 641b64c9f48139cf06774805d32892012fb9b82d (diff) | |
| download | gitdb-8ae4e9579a263684c6b760aec2869be480ff22ba.tar.gz | |
reduced usage of force_bytes as clients are expected to pass bytes.
It was useful for debugging though, maybe an explicit type assertions would
help others ?
As 'others' will be gitpython, I suppose I can handle it myself
Diffstat (limited to 'gitdb/stream.py')
| -rw-r--r-- | gitdb/stream.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gitdb/stream.py b/gitdb/stream.py index 43aa8e3..e32fcf3 100644 --- a/gitdb/stream.py +++ b/gitdb/stream.py @@ -543,9 +543,9 @@ class Sha1Writer(object): def write(self, data): """:raise IOError: If not all bytes could be written + :param data: byte object :return: length of incoming data""" - data = force_bytes(data) self.sha1.update(data) return len(data) @@ -590,8 +590,6 @@ class ZippedStoreShaWriter(Sha1Writer): return getattr(self.buf, attr) def write(self, data): - data = force_bytes(data) - alen = Sha1Writer.write(self, data) self.buf.write(self.zip.compress(data)) @@ -634,8 +632,6 @@ class FDCompressedSha1Writer(Sha1Writer): def write(self, data): """:raise IOError: If not all bytes could be written :return: lenght of incoming data""" - data = force_bytes(data) - self.sha1.update(data) cdata = self.zip.compress(data) bytes_written = write(self.fd, cdata) |
