diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-11-07 10:15:55 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-11-07 10:15:55 (GMT) |
commit | e2618f34be2deb65799ccf073933cd61b443efd4 (patch) | |
tree | 9225ffc012f01f1ec26e421e7f6ecf146deaa610 /Lib | |
parent | 39b53c50c4f0bbede11576e21a27fbb725176265 (diff) | |
parent | 3bd56387360e0b5ab1930640d0c4830c7fd6de23 (diff) | |
download | cpython-e2618f34be2deb65799ccf073933cd61b443efd4.zip cpython-e2618f34be2deb65799ccf073933cd61b443efd4.tar.gz cpython-e2618f34be2deb65799ccf073933cd61b443efd4.tar.bz2 |
Closes #13361: Merge fix from 3.2.
Diffstat (limited to 'Lib')
-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): |