Merged fix for #13361 from 3.2.
This commit is contained in:
commit
39b53c50c4
|
@ -1096,6 +1096,8 @@ class Manager(object):
|
||||||
placeholder to now point to the logger.
|
placeholder to now point to the logger.
|
||||||
"""
|
"""
|
||||||
rv = None
|
rv = None
|
||||||
|
if not isinstance(name, str):
|
||||||
|
raise ValueError('A logger name must be a string')
|
||||||
_acquireLock()
|
_acquireLock()
|
||||||
try:
|
try:
|
||||||
if name in self.loggerDict:
|
if name in self.loggerDict:
|
||||||
|
|
|
@ -310,6 +310,8 @@ class BuiltinLevelsTest(BaseTest):
|
||||||
('INF.BADPARENT', 'INFO', '4'),
|
('INF.BADPARENT', 'INFO', '4'),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def test_invalid_name(self):
|
||||||
|
self.assertRaises(ValueError, logging.getLogger, any)
|
||||||
|
|
||||||
class BasicFilterTest(BaseTest):
|
class BasicFilterTest(BaseTest):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue