From: Daan De Meyer Date: Fri, 24 Feb 2023 12:50:50 +0000 (+0100) Subject: Remove unused xescape() function X-Git-Tag: v15~314^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1363%2Fhead;p=thirdparty%2Fmkosi.git Remove unused xescape() function --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 484cd6ce3..224ad2722 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2313,19 +2313,6 @@ def find_image_version(args: argparse.Namespace) -> None: pass -def xescape(s: str) -> str: - "Escape a string udev-style, for inclusion in /dev/disk/by-*/* symlinks" - - ret = "" - for c in s: - if ord(c) <= 32 or ord(c) >= 127 or c == "/": - ret = ret + "\\x%02x" % ord(c) - else: - ret = ret + str(c) - - return ret - - DISABLED = Path('DISABLED') # A placeholder value to suppress autodetection. # This is used as a singleton, i.e. should be compared with # 'is' in other parts of the code.