diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-13 11:47:12 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-13 11:49:08 +0200 |
commit | 7484eb5178f2f72187c9d49563453be21688fa40 (patch) | |
tree | 9a66d4abe6d358710a80dbb8320250dbac6279b5 /bin/lts-bts | |
parent | dfa56735f543258b7e0ce21a82f7a2289a4b5259 (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-bts')
-rwxr-xr-x | bin/lts-bts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/bin/lts-bts b/bin/lts-bts index da9365721c..d1a70b63c2 100755 --- a/bin/lts-bts +++ b/bin/lts-bts @@ -13,12 +13,7 @@ import warnings 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 from jinja2 import Template |