]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Remove unused xescape() function 1363/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 24 Feb 2023 12:50:50 +0000 (13:50 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 24 Feb 2023 14:30:30 +0000 (15:30 +0100)
mkosi/__init__.py

index 484cd6ce3df94c19ae51a6161fbcf9f04ae0dda0..224ad27222776a4ba6ce7ca8f371a2396c983117 100644 (file)
@@ -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.