diff options
-rw-r--r-- | Lib/logging/__init__.py | 2 | ||||
-rw-r--r-- | 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 index a0c4cb7233..dad69aebca 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1008,7 +1008,7 @@ class Manager(object): """ rv = None if not isinstance(name, basestring): - raise ValueError('A logger name must be string or Unicode') + raise TypeError('A logger name must be string or Unicode') if isinstance(name, unicode): name = name.encode('utf-8') _acquireLock() diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index b2d0a2bda6..2aac3603dc 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -273,7 +273,7 @@ class BuiltinLevelsTest(BaseTest): ]) def test_invalid_name(self): - self.assertRaises(ValueError, logging.getLogger, any) + self.assertRaises(TypeError, logging.getLogger, any) class BasicFilterTest(BaseTest): |