diff options
-rw-r--r-- | pyuno/source/loader/pythonloader.py | 11 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py index eef1bd6274c5..7a66cfa9fc82 100644 --- a/pyuno/source/loader/pythonloader.py +++ b/pyuno/source/loader/pythonloader.py @@ -111,16 +111,18 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ): g_loadedComponents[url] = mod return mod elif "vnd.openoffice.pymodule" == protocol: - # the failure is on symbol lookup later in the parent ... - print ("Warning: Python module loading is almost certainly pre-broken") nSlash = dependent.rfind('/') if -1 != nSlash: path = unohelper.fileUrlToSystemPath( dependent[0:nSlash] ) dependent = dependent[nSlash+1:len(dependent)] if not path in sys.path: sys.path.append( path ) - var = __import__( dependent ) - return var + mod = __import__( dependent ) + path_component, dot, rest = dependent.partition('.') + while dot == '.': + path_component, dot, rest = rest.partition('.') + mod = getattr(mod, path_component) + return mod else: if DEBUG: print("Unknown protocol '" + protocol + "'"); @@ -140,7 +142,6 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ): mod = self.getModuleFromUrl( locationUrl ) implHelper = mod.__dict__.get( "g_ImplementationHelper" , None ) if DEBUG: - print ("dump stuff") print ("Fetched ImplHelper as " + str(implHelper)) if implHelper == None: return mod.getComponentFactory( implementationName, self.ctx.ServiceManager, regKey ) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index c6b1a089389f..37ec3b1b22c4 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -59,7 +59,6 @@ class FaxWizardDialogImpl(FaxWizardDialog): def startWizard(self, xMSF): self.running = True try: - print "entra" #Number of steps on WizardDialog self.nMaxStep = 5 |