From b655d20d6b6043c3e2f80d7414681b449f1b79ec Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 16 Jan 2021 22:01:50 +0100 Subject: [PATCH] locale/pick-complete-translations.py: run sort without shell Static code analyzers flag such things as security errors. --- locale/pick-complete-translations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locale/pick-complete-translations.py b/locale/pick-complete-translations.py index 8c3eead1..99c1c125 100755 --- a/locale/pick-complete-translations.py +++ b/locale/pick-complete-translations.py @@ -6,6 +6,7 @@ import json import os import re import requests +import subprocess import sys @@ -51,4 +52,4 @@ with open(manifest_file, 'a') as fp: if line: fp.write(line) -os.system('sort -u -o %s %s' % (manifest_file, manifest_file)) +subprocess.run(['sort', '-u', '-o', manifest_file, manifest_file])