Mercurial > gnulib
changeset 39031:0699d5dc603a
vfs: simplify table handling
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Sun, 08 Oct 2017 18:52:52 +0300 |
parents | 751050ba497e |
children | 2673a181e856 |
files | pygnulib/vfs.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/vfs.py Wed Oct 04 23:26:22 2017 +0300 +++ b/pygnulib/vfs.py Sun Oct 08 18:52:52 2017 +0300 @@ -73,11 +73,9 @@ 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)