summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-30 20:51:51 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-30 20:51:51 (GMT)
commit312cc0d28e86d36c1430814c91f9c1bb6087d588 (patch)
treec82738da9a215033f723e72e95370ff607399516 /Lib/logging
parentc55a7ea2b8b01cee6d09b7163e255654214a6cdb (diff)
downloadcpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.zip
cpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.tar.gz
cpython-312cc0d28e86d36c1430814c91f9c1bb6087d588.tar.bz2
Updated usage of boolean values.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py10
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):