48 @param fn service name to register (str) |
48 @param fn service name to register (str) |
49 @param path contains the path to the module (str) |
49 @param path contains the path to the module (str) |
50 @param module name to import (str) |
50 @param module name to import (str) |
51 @return text result of the import action (str) |
51 @return text result of the import action (str) |
52 """ |
52 """ |
53 sys.path.append(path) |
53 sys.path.insert(1, path) |
54 try: |
54 try: |
55 importedModule = __import__(module, globals(), locals(), [], 0) |
55 importedModule = __import__(module, globals(), locals(), [], 0) |
56 self.services[fn] = importedModule.initService() |
56 self.services[fn] = importedModule.initService() |
57 return 'ok' |
57 return 'ok' |
58 except ImportError: |
58 except ImportError: |