pyuno/source/loader/pythonloader.py | 11 ++++++----- wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 1 - 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit a94660eaaad9b662812fe0d3aee7179cf41c0ad9 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Mon Dec 12 22:12:40 2011 +0100 fix loading of python-uno module by package.module name diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py index eef1bd6..7a66cfa 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 c6b1a08..37ec3b1 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 _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits