mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-05 10:58:07 +01:00
- add get_binarylist_published()
- no need for StringIO'ifying the file object - remove a comment
This commit is contained in:
parent
b2aa457ecc
commit
409e46c3b0
16
osc/core.py
16
osc/core.py
@ -623,7 +623,6 @@ rev: %s
|
|||||||
tree.find('description').text = ''.join(self.descr)
|
tree.find('description').text = ''.join(self.descr)
|
||||||
tree.write(filename)
|
tree.write(filename)
|
||||||
|
|
||||||
# FIXME: escape stuff for xml
|
|
||||||
print '*' * 36, 'old', '*' * 36
|
print '*' * 36, 'old', '*' * 36
|
||||||
print m
|
print m
|
||||||
print '*' * 36, 'new', '*' * 36
|
print '*' * 36, 'new', '*' * 36
|
||||||
@ -1455,15 +1454,22 @@ def get_repos_of_project(apiurl, prj):
|
|||||||
|
|
||||||
|
|
||||||
def get_binarylist(apiurl, prj, repo, arch, package=None):
|
def get_binarylist(apiurl, prj, repo, arch, package=None):
|
||||||
if not package:
|
what = package or '_repository'
|
||||||
package = '_repository'
|
u = makeurl(apiurl, ['build', prj, repo, arch, what])
|
||||||
u = makeurl(apiurl, ['build', prj, repo, arch, package])
|
|
||||||
f = http_GET(u)
|
f = http_GET(u)
|
||||||
tree = ET.parse(StringIO(''.join(f)))
|
tree = ET.parse(f)
|
||||||
r = [ node.get('filename') for node in tree.findall('binary')]
|
r = [ node.get('filename') for node in tree.findall('binary')]
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
def get_binarylist_published(apiurl, prj, repo, arch):
|
||||||
|
u = makeurl(apiurl, ['published', prj, repo, arch])
|
||||||
|
f = http_GET(u)
|
||||||
|
tree = ET.parse(f)
|
||||||
|
r = [ node.get('name') for node in tree.findall('entry')]
|
||||||
|
return r
|
||||||
|
|
||||||
|
|
||||||
def show_results_meta(apiurl, prj, package=None):
|
def show_results_meta(apiurl, prj, package=None):
|
||||||
query = []
|
query = []
|
||||||
if package:
|
if package:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user