made import OS-independent

bzr-revno: 172
This commit is contained in:
Raoul Snyman 2008-12-03 18:13:27 +00:00
parent 3ad3a14ffb
commit 298729a12c

View File

@ -60,7 +60,7 @@ class PluginManager(object):
prefix = os.path.commonprefix([self.basepath, path])
# hack off the plugin base path
modulename = modulename[len(prefix) + 1:]
modulename = modulename.replace('/', '.')
modulename = modulename.replace(os.path.sep, '.')
# import the modules
log.debug("Importing %s from %s." % (modulename, path))
try: