Log a message with severity 'WARNING' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with a pre-defined format.
(msg, *args, **kwargs)
| 2193 | error(msg, *args, exc_info=exc_info, **kwargs) |
| 2194 | |
| 2195 | def warning(msg, *args, **kwargs): |
| 2196 | """ |
| 2197 | Log a message with severity 'WARNING' on the root logger. If the logger has |
| 2198 | no handlers, call basicConfig() to add a console handler with a pre-defined |
| 2199 | format. |
| 2200 | """ |
| 2201 | if len(root.handlers) == 0: |
| 2202 | basicConfig() |
| 2203 | root.warning(msg, *args, **kwargs) |
| 2204 | |
| 2205 | def warn(msg, *args, **kwargs): |
| 2206 | warnings.warn("The 'warn' function is deprecated, " |
no test coverage detected
searching dependent graphs…