diff options
author | Chris Ball <cjb@laptop.org> | 2008-06-26 03:22:41 (GMT) |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2008-06-26 15:31:23 (GMT) |
commit | b5e998156170b6187febafc859a58fadf6467244 (patch) | |
tree | d645e18384e9db01fb49b9bb563b5b6d001df1eb /src/controlpanel/cmd.py | |
parent | 574b4c40811601dd9d0e890173968375b9c45eb3 (diff) |
Use os.path.splitext() to get file extensions, not string.strip().
Diffstat (limited to 'src/controlpanel/cmd.py')
-rw-r--r-- | src/controlpanel/cmd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controlpanel/cmd.py b/src/controlpanel/cmd.py index a46a0aa..7cb40da 100644 --- a/src/controlpanel/cmd.py +++ b/src/controlpanel/cmd.py @@ -55,7 +55,7 @@ def load_modules(): modules = [] for file_name in file_names: if file_name.endswith('.py') and file_name != '__init__.py': - module_name = file_name.strip('.py') + module_name = os.path.splitext(file_name)[0] module = __import__('.'.join(subpath) + '.' + module_name, globals(), locals(), [module_name]) |