From: Joerg Behrmann Date: Thu, 1 Sep 2022 14:41:10 +0000 (+0200) Subject: Drop subprocess workaround for pre python 3.9 X-Git-Tag: v15~366^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f658e847cde4a52f5104916a282ce34caeb6bfdb;p=thirdparty%2Fmkosi.git Drop subprocess workaround for pre python 3.9 --- diff --git a/mkosi/backend.py b/mkosi/backend.py index 5475219f8..13b322e16 100644 --- a/mkosi/backend.py +++ b/mkosi/backend.py @@ -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():