summaryrefslogtreecommitdiffstats
path: root/bin/lts-needs-forward-port.py
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-08-13 11:47:12 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-08-13 11:49:08 +0200
commita51f0ac2888bb7da475af291f77a79fb7f7cd5e0 (patch)
treea967b015199565bf5c8738cc940e936ef1494059 /bin/lts-needs-forward-port.py
parentc741ea438ed32b771bc176bafd9db7af98a55c5e (diff)
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.
Diffstat (limited to 'bin/lts-needs-forward-port.py')
-rwxr-xr-xbin/lts-needs-forward-port.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/bin/lts-needs-forward-port.py b/bin/lts-needs-forward-port.py
index ee29ef5486..06a5630f8f 100755
--- a/bin/lts-needs-forward-port.py
+++ b/bin/lts-needs-forward-port.py
@@ -17,17 +17,11 @@
import argparse
import collections
-import os
import sys
from tracker_data import TrackerData
-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
lts = config.get_supported_releases()[0]

© 2014-2024 Faster IT GmbH | imprint | privacy policy