From 6aa78cd3b969ede76a1a6e660962e898421d4ed8 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Feb 2020 05:56:27 -0600 Subject: Remove checks for Python 2 and/or 3 --- git/refs/log.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'git/refs/log.py') diff --git a/git/refs/log.py b/git/refs/log.py index 274660c5..d51c3458 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -2,7 +2,6 @@ import re import time from git.compat import ( - PY3, string_types, defenc ) @@ -35,12 +34,7 @@ class RefLogEntry(tuple): def __repr__(self): """Representation of ourselves in git reflog format""" - res = self.format() - if PY3: - return res - # repr must return a string, which it will auto-encode from unicode using the default encoding. - # This usually fails, so we encode ourselves - return res.encode(defenc) + return self.format() def format(self): """:return: a string suitable to be placed in a reflog file""" -- cgit v1.2.1