mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Closes #13361: Raise correct exception type.
This commit is contained in:
parent
61b787e6dd
commit
3bd5638736
2 changed files with 2 additions and 2 deletions
|
@ -1095,7 +1095,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:
|
||||
|
|
|
@ -294,7 +294,7 @@ class BuiltinLevelsTest(BaseTest):
|
|||
])
|
||||
|
||||
def test_invalid_name(self):
|
||||
self.assertRaises(ValueError, logging.getLogger, any)
|
||||
self.assertRaises(TypeError, logging.getLogger, any)
|
||||
|
||||
class BasicFilterTest(BaseTest):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue