[Python-checkins] cpython (merge 3.2 -> default): Closes #13361: Merge fix from 3.2.
vinay.sajip
python-checkins at python.org
Mon Nov 7 11:16:13 CET 2011
http://hg.python.org/cpython/rev/fb73fe5d0ab1
changeset: 73420:fb73fe5d0ab1
parent: 73417:8c719e106694
parent: 73419:bc05c11b340e
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Mon Nov 07 10:15:55 2011 +0000
summary:
Closes #13361: Merge fix from 3.2.
files:
Lib/logging/__init__.py | 2 +-
Lib/test/test_logging.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1097,7 +1097,7 @@
"""
rv = None
if not isinstance(name, str):
- raise ValueError('A logger name must be a string')
+ raise TypeError('A logger name must be a string')
_acquireLock()
try:
if name in self.loggerDict:
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -311,7 +311,7 @@
])
def test_invalid_name(self):
- self.assertRaises(ValueError, logging.getLogger, any)
+ self.assertRaises(TypeError, logging.getLogger, any)
class BasicFilterTest(BaseTest):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list