]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Depend on FilePath.asTextMode().
authorDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 21:41:10 +0000 (21:41 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 2 Nov 2015 21:41:10 +0000 (21:41 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/util/encodingutil.py

index e18b854f2c5462de432cc81d16c16dda0ecdec37..fec92e4c47fab319ebc785df761797afa9a45a90 100644 (file)
@@ -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():
     """