From 83b92a8d31e616343a3e9b88ace75e8cca25a438 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Tue, 3 Dec 2019 13:25:04 +0100 Subject: lts-needs-forward-port: take releases from config.py --- bin/lts-needs-forward-port.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/lts-needs-forward-port.py b/bin/lts-needs-forward-port.py index 4277a832bc..5a0770bb29 100755 --- a/bin/lts-needs-forward-port.py +++ b/bin/lts-needs-forward-port.py @@ -18,21 +18,33 @@ import argparse import collections +import os import sys -from tracker_data import TrackerData, RELEASES +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 config + +lts = config.get_supported_releases()[0] +next_lts = config.get_supported_releases()[1] +oldstable = config.get_release_codename('oldstable') -# lts is currently jessie, next_lts stretch LIST_NAMES = ( ('needs_fix_in_next_lts', - ('Issues that are unfixed in {next_lts} but fixed in {lts}' - ).format(**RELEASES)), + ('Issues that are unfixed in {} but fixed in {}' + ).format(next_lts, lts)), ('needs_review_in_next_lts', - ('Issues that are no-dsa in {next_lts} but fixed in {lts}' - ).format(**RELEASES)), + ('Issues that are no-dsa in {} but fixed in {}' + ).format(next_lts, lts)), ('fixed_via_pu_in_oldstable', - ('Issues that will be fixed via p-u in {oldstable}' - ).format(**RELEASES)), + ('Issues that will be fixed via p-u in {}' + ).format(oldstable)), ) -- cgit v1.2.3