Replaced boolean test with is None
This commit is contained in:
parent
094662a165
commit
936654bce0
|
@ -539,7 +539,7 @@ class IMAP4:
|
||||||
# Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY')
|
# Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY')
|
||||||
self.untagged_responses = {} # Flush old responses.
|
self.untagged_responses = {} # Flush old responses.
|
||||||
self.is_readonly = readonly
|
self.is_readonly = readonly
|
||||||
if readonly:
|
if readonly is not None:
|
||||||
name = 'EXAMINE'
|
name = 'EXAMINE'
|
||||||
else:
|
else:
|
||||||
name = 'SELECT'
|
name = 'SELECT'
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ImportManager:
|
||||||
|
|
||||||
# This is the Importer that we use for grabbing stuff from the
|
# This is the Importer that we use for grabbing stuff from the
|
||||||
# filesystem. It defines one more method (import_from_dir) for our use.
|
# filesystem. It defines one more method (import_from_dir) for our use.
|
||||||
if not fs_imp:
|
if fs_imp is None:
|
||||||
cls = self.clsFilesystemImporter or _FilesystemImporter
|
cls = self.clsFilesystemImporter or _FilesystemImporter
|
||||||
fs_imp = cls()
|
fs_imp = cls()
|
||||||
self.fs_imp = fs_imp
|
self.fs_imp = fs_imp
|
||||||
|
|
|
@ -665,9 +665,9 @@ def formatargspec(args, varargs=None, varkw=None, defaults=None,
|
||||||
if defaults and i >= firstdefault:
|
if defaults and i >= firstdefault:
|
||||||
spec = spec + formatvalue(defaults[i - firstdefault])
|
spec = spec + formatvalue(defaults[i - firstdefault])
|
||||||
specs.append(spec)
|
specs.append(spec)
|
||||||
if varargs:
|
if varargs is not None:
|
||||||
specs.append(formatvarargs(varargs))
|
specs.append(formatvarargs(varargs))
|
||||||
if varkw:
|
if varkw is not None:
|
||||||
specs.append(formatvarkw(varkw))
|
specs.append(formatvarkw(varkw))
|
||||||
return '(' + string.join(specs, ', ') + ')'
|
return '(' + string.join(specs, ', ') + ')'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue