diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2008-12-04 16:36:56 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2008-12-04 16:36:56 +0100 |
| commit | 23d5e09e286cf7d5d8f80ac8d6f3313a50bb0ea3 (patch) | |
| tree | 3a7c2b5a7c1929b2e423933252b43b579209e42b /bin/tools/misc.py | |
| parent | 086fbc2d4d986e9d22d13c4ad65fd9fade250b44 (diff) | |
[IMP] move oswalksymlinks to a new module tools.osutil
bzr revid: christophe@tinyerp.com-20081204153656-l247acif1eqvyvl0
Diffstat (limited to 'bin/tools/misc.py')
| -rw-r--r-- | bin/tools/misc.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 6d65a425484..6c6efc5438b 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -252,23 +252,6 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False): raise IOError, 'File not found : '+str(name) -def oswalksymlinks(top, topdown=True, onerror=None): - """ - same as os.walk but follow symlinks - attention: all symlinks are walked before all normals directories - """ - for dirpath, dirnames, filenames in os.walk(top, topdown, onerror): - if topdown: - yield dirpath, dirnames, filenames - - symlinks = filter(lambda dirname: os.path.islink(os.path.join(dirpath, dirname)), dirnames) - for s in symlinks: - for x in oswalksymlinks(os.path.join(dirpath, s), topdown, onerror): - yield x - - if not topdown: - yield dirpath, dirnames, filenames - #---------------------------------------------------------- # iterables #---------------------------------------------------------- |
