MCPcopy Index your code
hub / github.com/python/cpython / _checkLevel

Function _checkLevel

Lib/logging/__init__.py:202–212  ·  view source on GitHub ↗
(level)

Source from the content-addressed store, hash-verified

200
201
202def _checkLevel(level):
203 if isinstance(level, int):
204 rv = level
205 elif str(level) == level:
206 if level not in _nameToLevel:
207 raise ValueError("Unknown level: %r" % level)
208 rv = _nameToLevel[level]
209 else:
210 raise TypeError("Level not an integer or a valid string: %r"
211 % (level,))
212 return rv
213
214#---------------------------------------------------------------------------
215# Thread-related stuff

Callers 5

__init__Method · 0.85
setLevelMethod · 0.85
disableMethod · 0.85
__init__Method · 0.85
setLevelMethod · 0.85

Calls 1

strFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…