From 67868399f6adb1282f6c2b0c13e6f07106350cf6 Mon Sep 17 00:00:00 2001 From: Tamara Schmitz Date: Thu, 3 Aug 2023 04:24:44 +0200 Subject: [PATCH] remove chrt since not available on all platforms --- manga/imagesToPdf.py | 11 +---------- music/musicbatchconverter.py | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/manga/imagesToPdf.py b/manga/imagesToPdf.py index 01c27e5..1b305bd 100755 --- a/manga/imagesToPdf.py +++ b/manga/imagesToPdf.py @@ -60,16 +60,7 @@ def exec_cmd(cmd, output=None): if args.v: print(" Executing command: {}".format(cmd)) return subprocess.run(cmd, shell=False, stdout=output, stderr=subprocess.STDOUT, startupinfo=si) - elif sys.platform == 'linux': - cmd.insert(0, "chrt") - cmd.insert(1, "-b") - cmd.insert(2, "0") - cmd.insert(3, "nice") - cmd.insert(4, "-n19") - if args.v: - print(" Executing command: {}".format(cmd)) - return subprocess.run(cmd, shell=False, stdout=output, stderr=subprocess.STDOUT) - elif sys.platform == 'darwin': + elif sys.platform == 'linux' or sys.platform == 'darwin': cmd.insert(0, "nice") cmd.insert(1, "-n19") if args.v: diff --git a/music/musicbatchconverter.py b/music/musicbatchconverter.py index ca168ce..1c8c95a 100755 --- a/music/musicbatchconverter.py +++ b/music/musicbatchconverter.py @@ -27,16 +27,7 @@ def exec_cmd(cmd, output=None): if args.v: print(" Executing command: {}".format(cmd)) return subprocess.run(cmd, shell=False, stdout=output, stderr=subprocess.STDOUT, startupinfo=si) - elif sys.platform == 'linux': - cmd.insert(0, "chrt") - cmd.insert(1, "-b") - cmd.insert(2, "0") - cmd.insert(3, "nice") - cmd.insert(4, "-n19") - if args.v: - print(" Executing command: {}".format(cmd)) - return subprocess.run(cmd, shell=False, stdout=output, stderr=subprocess.STDOUT) - elif sys.platform == 'darwin': + elif sys.platform == 'linux' or sys.platform == 'darwin': cmd.insert(0, "nice") cmd.insert(1, "-n19") if args.v: