diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-11-07 08:49:16 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-11-07 08:49:16 (GMT) |
commit | 74ab3440bad1b97e39fb5adf992e555ba26001d1 (patch) | |
tree | 8de7fb33c65b28eb39fd6a760d1207758ed6595d /Lib/logging/__init__.py | |
parent | caf0272d40f4af95d28797f1ad84b8f641368240 (diff) | |
download | cpython-74ab3440bad1b97e39fb5adf992e555ba26001d1.zip cpython-74ab3440bad1b97e39fb5adf992e555ba26001d1.tar.gz cpython-74ab3440bad1b97e39fb5adf992e555ba26001d1.tar.bz2 |
Closes #13661: Check added for type of logger name.
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index f6af605..a0c4cb7 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1007,6 +1007,8 @@ class Manager(object): placeholder to now point to the logger. """ rv = None + if not isinstance(name, basestring): + raise ValueError('A logger name must be string or Unicode') if isinstance(name, unicode): name = name.encode('utf-8') _acquireLock() |