From 55146609e2d0b120c5417714a183b3b0b625ea80 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 19:48:47 +0530 Subject: =?UTF-8?q?removed=20Unnecessary=20=E2=80=9Celse=E2=80=9D=20after?= =?UTF-8?q?=20=E2=80=9Creturn=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git/compat.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/git/compat.py b/git/compat.py index 02dc69de..e88ca9b5 100644 --- a/git/compat.py +++ b/git/compat.py @@ -145,14 +145,12 @@ FS_ERRORS = 'surrogateescape' def u(text): if PY3: return text - else: - return text.decode('unicode_escape') + return text.decode('unicode_escape') def b(data): if PY3: return data.encode('latin1') - else: - return data + return data if PY3: _unichr = chr @@ -282,8 +280,7 @@ def encodefilename(fn): ch_utf8 = ch.encode('utf-8') encoded.append(ch_utf8) return bytes().join(encoded) - else: - return fn.encode(FS_ENCODING, FS_ERRORS) + return fn.encode(FS_ENCODING, FS_ERRORS) def decodefilename(fn): return fn.decode(FS_ENCODING, FS_ERRORS) -- cgit v1.2.1