Shutdown Source VM (PAUSED) on successfull migration + blackened all .py files

This commit is contained in:
ahmadbilalkhalid 2019-12-30 14:35:07 +05:00
commit 9bdf4d2180
31 changed files with 1307 additions and 638 deletions

View file

@ -7,21 +7,21 @@ class NoTracebackStreamHandler(logging.StreamHandler):
info, cache = record.exc_info, record.exc_text
record.exc_info, record.exc_text = None, None
if record.levelname in ['WARNING', 'WARN']:
if record.levelname in ["WARNING", "WARN"]:
color = colorama.Fore.LIGHTYELLOW_EX
elif record.levelname == 'ERROR':
elif record.levelname == "ERROR":
color = colorama.Fore.LIGHTRED_EX
elif record.levelname == 'INFO':
elif record.levelname == "INFO":
color = colorama.Fore.LIGHTGREEN_EX
elif record.levelname == 'CRITICAL':
elif record.levelname == "CRITICAL":
color = colorama.Fore.LIGHTCYAN_EX
else:
color = colorama.Fore.WHITE
try:
print(color, end='', flush=True)
print(color, end="", flush=True)
super().handle(record)
finally:
record.exc_info = info
record.exc_text = cache
print(colorama.Style.RESET_ALL, end='', flush=True)
print(colorama.Style.RESET_ALL, end="", flush=True)