diff --git a/osc/commandline.py b/osc/commandline.py index 80abf2a2..3fa9835f 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5341,10 +5341,6 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.alias('dists') -# FIXME: using just ^DISCONTINUED as match is not a general approach and only valid for one instance -# we need to discuss an api call for that, if we need this -# @cmdln.option('-d', '--discontinued', action='store_true', -# help='show discontinued distributions') def do_distributions(self, subcmd, opts, *args): """${cmd_name}: Shows all available distributions diff --git a/osc/core.py b/osc/core.py index 1cf8c680..8ccef36a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -5603,28 +5603,10 @@ def get_repositories(apiurl): return r -def get_distributions(apiurl, discon=False): +def get_distributions(apiurl): """Returns list of dicts with headers 'distribution', 'project', 'repository', 'reponame'""" - # FIXME: this is just a naming convention on api.opensuse.org, but not a general valid apparoach - if discon: - r = [] - result_line_templ = '%(name)-25s %(project)s' - f = http_GET(makeurl(apiurl, ['build'])) - root = ET.fromstring(''.join(f)) - - for node in root.findall('entry'): - if node.get('name').startswith('DISCONTINUED:'): - rmap = {} - rmap['name'] = node.get('name').replace('DISCONTINUED:', '').replace(':', ' ') - rmap['project'] = node.get('name') - r.append(result_line_templ % rmap) - - r.insert(0, 'distribution project') - r.insert(1, '------------ -------') - return r - f = http_GET(makeurl(apiurl, ['distributions'])) root = ET.fromstring(b''.join(f))