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/specifications/vdrive/htmlfontify-example.html?a=commitdiff_plain;h=8f53e4b72eeaadbc83dde8869f96a03bcfd1c77f;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(): """