From a51f0ac2888bb7da475af291f77a79fb7f7cd5e0 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Thu, 13 Aug 2020 11:47:12 +0200 Subject: De-duplicate setup_path All the scripts in bin/ can share the definition. Also setup_paths.py calls setup_path so one just has to import that module before importing those from lib/python/. Additionally this helps some scripts work better under Python 3, as one variant of setup_paths that we had called string.rfind, which is not present there. --- bin/lts-cve-triage.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'bin/lts-cve-triage.py') diff --git a/bin/lts-cve-triage.py b/bin/lts-cve-triage.py index 7f106ab8e6..9a90fcd816 100755 --- a/bin/lts-cve-triage.py +++ b/bin/lts-cve-triage.py @@ -15,7 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this file. If not, see . -import os import sys import argparse import collections @@ -23,12 +22,7 @@ import collections from tracker_data import TrackerData from unsupported_packages import UnsupportedPackages, LimitedSupportPackages -def setup_path(): - dirname = os.path.dirname - base = dirname(dirname(os.path.realpath(sys.argv[0]))) - sys.path.insert(0, os.path.join(base, "lib", "python")) - -setup_path() +import setup_paths import config RELEASES = { -- cgit v1.2.3