2008-02-24 | Paul Boddie | raw files shortlog changelog graph | Avoid importing non-module files such as temporary editor files. | |
micropython/__init__.py (file) |
1.1 --- a/micropython/__init__.py Sun Feb 24 01:27:16 2008 +0100 1.2 +++ b/micropython/__init__.py Sun Feb 24 19:03:08 2008 +0100 1.3 @@ -391,7 +391,9 @@ 1.4 """ 1.5 1.6 for filename in os.listdir(pathname): 1.7 - submodule = os.path.splitext(filename)[0] 1.8 + submodule, ext = os.path.splitext(filename) 1.9 + if ext not in ("", ".py"): 1.10 + continue 1.11 module.set_module(submodule, self.add_module(module.name + "." + submodule)) 1.12 1.13 # vim: tabstop=4 expandtab shiftwidth=4