[Libreoffice-commits] .: wizards/com
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Dec 9 14:29:12 PST 2012
wizards/com/sun/star/wizards/common/ConfigSet.py | 2 -
wizards/com/sun/star/wizards/common/PropertySetHelper.py | 28 +++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)
New commits:
commit 5020526b6e04fe21c0d7027e2e3070dad08dd6d9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Dec 9 23:27:39 2012 +0100
Python/pep8: fix E711 (is or is not None instead of = or !=) in common module
Change-Id: I98fc203e5820475cb6849c3708266face92f9403
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.py b/wizards/com/sun/star/wizards/common/ConfigSet.py
index e1a899b..f9b3856 100644
--- a/wizards/com/sun/star/wizards/common/ConfigSet.py
+++ b/wizards/com/sun/star/wizards/common/ConfigSet.py
@@ -192,7 +192,7 @@ class ConfigSet(ConfigNode):
i = 0
while i < v.size():
member = v.get(i)
- if member != None:
+ if member is not None:
Configuration.set((index + 1), indexPropertyName, member)
i += 1
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
index c7d75a5..3736972 100644
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py
+++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
@@ -47,7 +47,7 @@ class PropertySetHelper(object):
'''
def setPropertyValue(self, _sName, _aValue):
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
self.m_xPropertySet.setPropertyValue(_sName, _aValue)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -76,7 +76,7 @@ class PropertySetHelper(object):
def getPropertyValueAsInteger(self, _sName, _nDefault):
aObject = None
nValue = _nDefault
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -84,7 +84,7 @@ class PropertySetHelper(object):
except com.sun.star.lang.WrappedTargetException, e:
DebugHelper.writeInfo(e.getMessage())
- if aObject != None:
+ if aObject is not None:
try:
nValue = NumericalHelper.toInt(aObject)
except ValueError, e:
@@ -103,7 +103,7 @@ class PropertySetHelper(object):
def getPropertyValueAsShort(self, _sName, _nDefault):
aObject = None
nValue = _nDefault
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -111,7 +111,7 @@ class PropertySetHelper(object):
except com.sun.star.lang.WrappedTargetException, e:
DebugHelper.writeInfo(e.getMessage())
- if aObject != None:
+ if aObject is not None:
try:
nValue = NumericalHelper.toShort(aObject)
except ValueError, e:
@@ -129,7 +129,7 @@ class PropertySetHelper(object):
def getPropertyValueAsDouble(self, _sName, _nDefault):
aObject = None
nValue = _nDefault
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -139,11 +139,11 @@ class PropertySetHelper(object):
# TODO: I wonder why the same thing is not done in the rest of the
# getPropertyValueAs* functions...
- if aObject == None:
+ if aObject is None:
if _sName in self.m_aHashMap:
aObject = self.m_aHashMap[_sName]
- if aObject != None:
+ if aObject is not None:
try:
nValue = NumericalHelper.toDouble(aObject)
except ValueError, e:
@@ -161,7 +161,7 @@ class PropertySetHelper(object):
def getPropertyValueAsBoolean(self, _sName, _bDefault):
aObject = None
bValue = _bDefault
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -171,7 +171,7 @@ class PropertySetHelper(object):
except com.sun.star.lang.WrappedTargetException, e:
DebugHelper.writeInfo(e.getMessage())
- if aObject != None:
+ if aObject is not None:
try:
bValue = NumericalHelper.toBoolean(aObject)
except ValueError, e:
@@ -189,7 +189,7 @@ class PropertySetHelper(object):
def getPropertyValueAsString(self, _sName, _sDefault):
aObject = None
sValue = _sDefault
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -197,7 +197,7 @@ class PropertySetHelper(object):
except com.sun.star.lang.WrappedTargetException, e:
DebugHelper.writeInfo(e.getMessage())
- if aObject != None:
+ if aObject is not None:
try:
sValue = AnyConverter.toString(aObject)
except ValueError, e:
@@ -213,7 +213,7 @@ class PropertySetHelper(object):
def getPropertyValueAsObject(self, _sName):
aObject = None
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
try:
aObject = self.m_xPropertySet.getPropertyValue(_sName)
except com.sun.star.beans.UnknownPropertyException, e:
@@ -241,7 +241,7 @@ class PropertySetHelper(object):
def showProperties(self):
sName = ""
- if self.m_xPropertySet != None:
+ if self.m_xPropertySet is not None:
sName = self.m_xPropertySet.getImplementationName()
xInfo = self.m_xPropertySet.getPropertySetInfo()
More information about the Libreoffice-commits
mailing list