]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Drop subprocess workaround for pre python 3.9
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 1 Sep 2022 14:41:10 +0000 (16:41 +0200)
committerJoerg Behrmann <behrmann@physik.fu-berlin.de>
Fri, 13 Jan 2023 08:54:26 +0000 (09:54 +0100)
mkosi/backend.py

index 5475219f8f2ffad715f047768a3aea3be3d32e30..13b322e162e07269d575a6f04a86a1dc93027ed1 100644 (file)
@@ -711,14 +711,6 @@ def run(
         # output.
         stdout = sys.stderr
 
-    # This is a workaround for copy_git_files, which uses the user= option to
-    # subprocess.run, which is only available starting with Python 3.9
-    # TODO: remove this branch once mkosi defaults to at least Python 3.9
-    if "user" in kwargs and sys.version_info < (3, 9):
-        user = kwargs.pop("user")
-        user = f"#{user}" if isinstance(user, int) else user
-        cmdline = ["sudo", "-u", user] + cmdline
-
     cm = do_delay_interrupt if delay_interrupt else do_noop
     try:
         with cm():