diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-30 20:51:51 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-30 20:51:51 (GMT) |
commit | 312cc0d28e86d36c1430814c91f9c1bb6087d588 (patch) | |
tree | c82738da9a215033f723e72e95370ff607399516 /Lib/logging/__init__.py | |
parent | c55a7ea2b8b01cee6d09b7163e255654214a6cdb (diff) | |
download | cpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.zip cpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.tar.gz cpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.tar.bz2 |
Updated usage of boolean values.
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 7f7d5c9..3a8a639 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -688,14 +688,14 @@ class Filterer(object): Allow filters to be just callables. """ - rv = 1 + rv = True for f in self.filters: if hasattr(f, 'filter'): result = f.filter(record) else: result = f(record) # assume callable - will raise if not if not result: - rv = 0 + rv = False break return rv @@ -1197,9 +1197,9 @@ class Logger(Filterer): self.name = name self.level = _checkLevel(level) self.parent = None - self.propagate = 1 + self.propagate = True self.handlers = [] - self.disabled = 0 + self.disabled = False def setLevel(self, level): """ @@ -1567,7 +1567,7 @@ class LoggerAdapter(object): """ Delegate an exception call to the underlying logger. """ - kwargs["exc_info"] = 1 + kwargs["exc_info"] = True self.log(ERROR, msg, *args, **kwargs) def critical(self, msg, *args, **kwargs): |