From: Daira Hopwood Date: Mon, 2 Nov 2015 21:41:10 +0000 (+0000) Subject: Depend on FilePath.asTextMode(). X-Git-Url: https://git.rkrishnan.org/pf?a=commitdiff_plain;h=4a90dcfe6fe76b733f8cb396b0be58672d5f4ce2;p=tahoe-lafs%2Ftahoe-lafs.git Depend on FilePath.asTextMode(). Signed-off-by: Daira Hopwood --- 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(): """