From: Dmitry Selyutin Date: Sun, 8 Oct 2017 15:52:52 +0000 (+0300) Subject: vfs: simplify table handling X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10cb473447f4ea2548139c01937867a8c7e59d40;p=thirdparty%2Fgnulib.git vfs: simplify table handling --- diff --git a/pygnulib/vfs.py b/pygnulib/vfs.py index abc5958c58..fcabeb524d 100644 --- a/pygnulib/vfs.py +++ b/pygnulib/vfs.py @@ -73,11 +73,9 @@ class Base: if part == "..": parts += [part] continue - if not replaced: - for (old, new) in self.__table.items(): - if part == old: - part = self.__table[new] - replaced = True + if not replaced and part in self.__table: + part = self.__table[part] + replaced = True parts += [part] return _os_.path.sep.join([self.__path] + parts)