From 79a958b867c2941d68fbb9bd594a1c26f511003c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Neuh=C3=A4user?= Date: Sat, 12 Jun 2010 20:21:14 +0200 Subject: [PATCH] Remove unnecessary code --- tests/path.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/path.py b/tests/path.py index dccdac3ab..28a8c22af 100644 --- a/tests/path.py +++ b/tests/path.py @@ -21,12 +21,9 @@ class path(str): Represents a path which behaves like a string. """ if sys.version_info < (3, 0): - def __new__(cls, s, encoding=FILESYSTEMENCODING, errors=None): + def __new__(cls, s, encoding=FILESYSTEMENCODING, errors='strict'): if isinstance(s, unicode): - if errors is None: - s = s.encode(encoding) - else: - s = s.encode(encoding, errors=errors) + s = s.encode(encoding, errors=errors) return str.__new__(cls, s) return str.__new__(cls, s)