build the error message Args: content: content of the message Returns: the message in error structure - None
(content)
| 121 | |
| 122 | |
| 123 | def error(content): |
| 124 | """ |
| 125 | build the error message |
| 126 | |
| 127 | Args: |
| 128 | content: content of the message |
| 129 | |
| 130 | Returns: |
| 131 | the message in error structure - None |
| 132 | """ |
| 133 | logger.error(content) |
| 134 | sys.stdout.buffer.write( |
| 135 | (color.color_cmd("red") |
| 136 | + "[X] [{0}] ".format(now()) |
| 137 | + color.color_cmd("yellow") |
| 138 | + content + color.color_cmd("reset") |
| 139 | + "\n" |
| 140 | ).encode("utf8") |
| 141 | ) |
| 142 | sys.stdout.flush() |
| 143 | return |
| 144 | |
| 145 | |
| 146 | def write_to_api_console(content): |
no test coverage detected