offlineimap/utils files singleton-comparison
This patch change these errors in the utils folder C0121: Comparison to None should be 'expr is None' (singleton-comparison) C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
This commit is contained in:
parent
7b082f0fe9
commit
da2baaaeb7
@ -15,7 +15,7 @@ class ConstProxy():
|
||||
|
||||
def __getattr__(self, name):
|
||||
src = self.__dict__['__source']
|
||||
if src == None:
|
||||
if src is None:
|
||||
raise ValueError("using non-initialized ConstProxy() object")
|
||||
return copy.deepcopy(getattr(src, name))
|
||||
|
||||
@ -29,6 +29,6 @@ class ConstProxy():
|
||||
|
||||
def set_source(self, source):
|
||||
""" Sets source object for this instance. """
|
||||
if (self.__dict__['__source'] != None):
|
||||
if (self.__dict__['__source'] is not None):
|
||||
raise ValueError("source object is already set")
|
||||
self.__dict__['__source'] = source
|
||||
|
@ -86,7 +86,7 @@ def get_os_sslcertfile():
|
||||
"""
|
||||
|
||||
l = get_os_sslcertfile_searchpath()
|
||||
if l == None:
|
||||
if l is None:
|
||||
return None
|
||||
|
||||
for f in l:
|
||||
|
Loading…
Reference in New Issue
Block a user