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 c5988c9..988cbed 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1097,7 +1097,7 @@ class Manager(object): """ 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 index 64c0653..ed22d91 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -311,7 +311,7 @@ class BuiltinLevelsTest(BaseTest): ]) def test_invalid_name(self): - self.assertRaises(ValueError, logging.getLogger, any) + self.assertRaises(TypeError, logging.getLogger, any) class BasicFilterTest(BaseTest): |