summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-12-09 23:16:08 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-12-09 23:16:08 +0100
commita0f86c9c1d2ec16f87688a16a52f3e40e3e04391 (patch)
tree3c0bdd5c0e4e3528e41bd8f0dfb9b045bf797b39 /pyuno
parent815f40a6ca428867d4c31249bf0eb8075f050158 (diff)
Python/pep8: fix E711 (is or is not None instead of = or !=) in pyuno module
Change-Id: I8ee9abc9a31a6d7791a006ed589d83d5858de267
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/loader/pythonloader.py4
-rw-r--r--pyuno/source/module/unohelper.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py
index 03bf7d21b24f..bc09725975fd 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -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 )
diff --git a/pyuno/source/module/unohelper.py b/pyuno/source/module/unohelper.py
index 966080e12af6..28c9ffdbdbe9 100644
--- a/pyuno/source/module/unohelper.py
+++ b/pyuno/source/module/unohelper.py
@@ -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