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)
| 2116 | error(msg, *args, exc_info=exc_info, **kwargs) |
| 2117 | |
| 2118 | def warning(msg, *args, **kwargs): |
| 2119 | """ |
| 2120 | Log a message with severity 'WARNING' on the root logger. If the logger has |
| 2121 | no handlers, call basicConfig() to add a console handler with a pre-defined |
| 2122 | format. |
| 2123 | """ |
| 2124 | if len(root.handlers) == 0: |
| 2125 | basicConfig() |
| 2126 | root.warning(msg, *args, **kwargs) |
| 2127 | |
| 2128 | def warn(msg, *args, **kwargs): |
| 2129 | warnings.warn("The 'warn' function is deprecated, " |
no test coverage detected