From 7508744ea0e64ec087c97f4ae8c87b2eab6d07af Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 2 Nov 2015 21:41:10 +0000 Subject: [PATCH] Depend on FilePath.asTextMode(). Signed-off-by: Daira Hopwood --- src/allmydata/util/encodingutil.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/allmydata/util/encodingutil.py b/src/allmydata/util/encodingutil.py index e18b854f..fec92e4c 100644 --- a/src/allmydata/util/encodingutil.py +++ b/src/allmydata/util/encodingutil.py @@ -297,12 +297,7 @@ def unicode_segments_from(base_fp, ancestor_fp): precondition(isinstance(base_fp, FilePath), base_fp=base_fp) precondition(isinstance(ancestor_fp, FilePath), ancestor_fp=ancestor_fp) - if hasattr(FilePath, 'asTextMode'): - return base_fp.asTextMode().segmentsFrom(ancestor_fp.asTextMode()) - else: - bpt, apt = (type(base_fp.path), type(ancestor_fp.path)) - _assert(bpt == apt, bpt=bpt, apt=apt) - return map(_decode, base_fp.segmentsFrom(ancestor_fp)) + return base_fp.asTextMode().segmentsFrom(ancestor_fp.asTextMode()) def unicode_platform(): """ -- 2.45.2