summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/logging
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py10
-rw-r--r--Lib/logging/config.py2
-rw-r--r--Lib/logging/handlers.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index ef78422..e714760 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -638,8 +638,8 @@ class Handler(Filterer):
This version is intended to be implemented by subclasses and so
raises a NotImplementedError.
"""
- raise NotImplementedError, 'emit must be implemented '\
- 'by Handler subclasses'
+ raise NotImplementedError('emit must be implemented '
+ 'by Handler subclasses')
def handle(self, record):
"""
@@ -834,8 +834,8 @@ def setLoggerClass(klass):
"""
if klass != Logger:
if not issubclass(klass, Logger):
- raise TypeError, "logger not derived from logging.Logger: " + \
- klass.__name__
+ raise TypeError("logger not derived from logging.Logger: "
+ + klass.__name__)
global _loggerClass
_loggerClass = klass
@@ -1047,7 +1047,7 @@ class Logger(Filterer):
"""
if not isinstance(level, int):
if raiseExceptions:
- raise TypeError, "level must be an integer"
+ raise TypeError("level must be an integer")
else:
return
if self.isEnabledFor(level):
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 99755e2..ed14052 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -246,7 +246,7 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
stopListening().
"""
if not thread:
- raise NotImplementedError, "listen() needs threading to work"
+ raise NotImplementedError("listen() needs threading to work")
class ConfigStreamHandler(StreamRequestHandler):
"""
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 2279db2..893fbe6 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -920,7 +920,7 @@ class HTTPHandler(logging.Handler):
logging.Handler.__init__(self)
method = method.upper()
if method not in ["GET", "POST"]:
- raise ValueError, "method must be GET or POST"
+ raise ValueError("method must be GET or POST")
self.host = host
self.url = url
self.method = method