Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
74ab3440
Kaydet (Commit)
74ab3440
authored
Kas 07, 2011
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #13661: Check added for type of logger name.
üst
caf0272d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
__init__.py
Lib/logging/__init__.py
+2
-0
test_logging.py
Lib/test/test_logging.py
+2
-0
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
74ab3440
...
...
@@ -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
()
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
74ab3440
...
...
@@ -272,6 +272,8 @@ class BuiltinLevelsTest(BaseTest):
(
'INF.BADPARENT'
,
'INFO'
,
'4'
),
])
def
test_invalid_name
(
self
):
self
.
assertRaises
(
ValueError
,
logging
.
getLogger
,
any
)
class
BasicFilterTest
(
BaseTest
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment