mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: rename warn warning
This commit is contained in:
@@ -74,11 +74,11 @@ def run_process_checkret(args, check=True):
|
|||||||
try:
|
try:
|
||||||
ret = subprocess.run(args, capture_output=True)
|
ret = subprocess.run(args, capture_output=True)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.warn("Caught KeyboardInterrupt, exiting gracefully...")
|
logger.warning("Caught KeyboardInterrupt, exiting gracefully...")
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
logger.warn(f"Command '{e.cmd}' returned non-zero exit status {e.returncode}.")
|
logger.warning(f"Command '{e.cmd}' returned non-zero exit status {e.returncode}.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn(f"An error occurred executing {e}")
|
logger.warning(f"An error occurred executing {e}")
|
||||||
|
|
||||||
# handle output
|
# handle output
|
||||||
stdout_s = ""
|
stdout_s = ""
|
||||||
@@ -178,7 +178,7 @@ def ui_string_decode(data):
|
|||||||
else:
|
else:
|
||||||
return "(utf8) " + data.decode("utf-8")
|
return "(utf8) " + data.decode("utf-8")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("ui_string_decode: {}".format(e))
|
logger.warning("ui_string_decode: {}".format(e))
|
||||||
|
|
||||||
def ascii_to_hex_bytes(ascii_bytes):
|
def ascii_to_hex_bytes(ascii_bytes):
|
||||||
hex_escaped = ''.join(f'\\x{byte:02x}' for byte in ascii_bytes)
|
hex_escaped = ''.join(f'\\x{byte:02x}' for byte in ascii_bytes)
|
||||||
|
|||||||
Reference in New Issue
Block a user