diff --git a/doc/source/changes.rst b/doc/source/changes.rst index 4623fdc41..9bf09065a 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -5,7 +5,8 @@ Changelog 2.0.6 - Fixes ============= -* ... +* Fix: TypeError about passing keyword argument to string decode() on + Python 2.6. 2.0.5 - Fixes ============= diff --git a/git/objects/commit.py b/git/objects/commit.py index 58a8912f9..9e434c921 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -501,14 +501,14 @@ def _deserialize(self, stream): try: self.author, self.authored_date, self.author_tz_offset = \ - parse_actor_and_date(author_line.decode(self.encoding, errors='replace')) + parse_actor_and_date(author_line.decode(self.encoding, 'replace')) except UnicodeDecodeError: log.error("Failed to decode author line '%s' using encoding %s", author_line, self.encoding, exc_info=True) try: self.committer, self.committed_date, self.committer_tz_offset = \ - parse_actor_and_date(committer_line.decode(self.encoding, errors='replace')) + parse_actor_and_date(committer_line.decode(self.encoding, 'replace')) except UnicodeDecodeError: log.error("Failed to decode committer line '%s' using encoding %s", committer_line, self.encoding, exc_info=True) @@ -518,7 +518,7 @@ def _deserialize(self, stream): # The end of our message stream is marked with a newline that we strip self.message = stream.read() try: - self.message = self.message.decode(self.encoding, errors='replace') + self.message = self.message.decode(self.encoding, 'replace') except UnicodeDecodeError: log.error("Failed to decode message '%s' using encoding %s", self.message, self.encoding, exc_info=True) # END exception handling
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: