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