Python/pep8: fix E711 (is or is not None instead of = or !=) in pyuno module
Change-Id: I8ee9abc9a31a6d7791a006ed589d83d5858de267
This commit is contained in:
@@ -134,7 +134,7 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
|
|||||||
implHelper = mod.__dict__.get( "g_ImplementationHelper" , None )
|
implHelper = mod.__dict__.get( "g_ImplementationHelper" , None )
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print ("Fetched ImplHelper as " + str(implHelper))
|
print ("Fetched ImplHelper as " + str(implHelper))
|
||||||
if implHelper == None:
|
if implHelper is None:
|
||||||
return mod.getComponentFactory( implementationName, self.ctx.ServiceManager, regKey )
|
return mod.getComponentFactory( implementationName, self.ctx.ServiceManager, regKey )
|
||||||
else:
|
else:
|
||||||
return implHelper.getComponentFactory( implementationName,regKey,self.ctx.ServiceManager)
|
return implHelper.getComponentFactory( implementationName,regKey,self.ctx.ServiceManager)
|
||||||
@@ -145,7 +145,7 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
|
|||||||
|
|
||||||
mod = self.getModuleFromUrl( locationUrl )
|
mod = self.getModuleFromUrl( locationUrl )
|
||||||
implHelper = mod.__dict__.get( "g_ImplementationHelper" , None )
|
implHelper = mod.__dict__.get( "g_ImplementationHelper" , None )
|
||||||
if implHelper == None:
|
if implHelper is None:
|
||||||
return mod.writeRegistryInfo( self.ctx.ServiceManager, regKey )
|
return mod.writeRegistryInfo( self.ctx.ServiceManager, regKey )
|
||||||
else:
|
else:
|
||||||
return implHelper.writeRegistryInfo( regKey, self.ctx.ServiceManager )
|
return implHelper.writeRegistryInfo( regKey, self.ctx.ServiceManager )
|
||||||
|
@@ -145,19 +145,19 @@ class ImplementationHelper:
|
|||||||
|
|
||||||
def getComponentFactory( self, implementationName , regKey, smgr ):
|
def getComponentFactory( self, implementationName , regKey, smgr ):
|
||||||
entry = self.impls.get( implementationName, None )
|
entry = self.impls.get( implementationName, None )
|
||||||
if entry == None:
|
if entry is None:
|
||||||
raise RuntimeException( implementationName + " is unknown" , None )
|
raise RuntimeException( implementationName + " is unknown" , None )
|
||||||
return createSingleServiceFactory( entry.ctor, implementationName, entry.serviceNames )
|
return createSingleServiceFactory( entry.ctor, implementationName, entry.serviceNames )
|
||||||
|
|
||||||
def getSupportedServiceNames( self, implementationName ):
|
def getSupportedServiceNames( self, implementationName ):
|
||||||
entry = self.impls.get( implementationName, None )
|
entry = self.impls.get( implementationName, None )
|
||||||
if entry == None:
|
if entry is None:
|
||||||
raise RuntimeException( implementationName + " is unknown" , None )
|
raise RuntimeException( implementationName + " is unknown" , None )
|
||||||
return entry.serviceNames
|
return entry.serviceNames
|
||||||
|
|
||||||
def supportsService( self, implementationName, serviceName ):
|
def supportsService( self, implementationName, serviceName ):
|
||||||
entry = self.impls.get( implementationName,None )
|
entry = self.impls.get( implementationName,None )
|
||||||
if entry == None:
|
if entry is None:
|
||||||
raise RuntimeException( implementationName + " is unknown", None )
|
raise RuntimeException( implementationName + " is unknown", None )
|
||||||
return serviceName in entry.serviceNames
|
return serviceName in entry.serviceNames
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ class CurrentContext(XCurrentContext, Base ):
|
|||||||
def getValueByName( self, name ):
|
def getValueByName( self, name ):
|
||||||
if name in self.hashMap:
|
if name in self.hashMap:
|
||||||
return self.hashMap[name]
|
return self.hashMap[name]
|
||||||
elif self.oldContext != None:
|
elif self.oldContext is not None:
|
||||||
return self.oldContext.getValueByName( name )
|
return self.oldContext.getValueByName( name )
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user