mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 18:26:15 +01:00
fetch meta data only if it's actually needed
This commit is contained in:
parent
f635b50e3b
commit
e21e1e9e42
@ -4329,28 +4329,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
prj = args[0]
|
prj = args[0]
|
||||||
m = show_project_meta(conf.config['apiurl'], prj)
|
|
||||||
root = ET.fromstring(''.join(m))
|
|
||||||
elif len(args) == 2:
|
elif len(args) == 2:
|
||||||
prj = args[0]
|
prj = args[0]
|
||||||
pac = args[1]
|
pac = args[1]
|
||||||
m = show_package_meta(conf.config['apiurl'], prj, pac)
|
|
||||||
root = ET.fromstring(''.join(m))
|
|
||||||
if not opts.nodevelproject and not opts.delete and not opts.add:
|
|
||||||
while root.findall('devel'):
|
|
||||||
d = root.find('devel')
|
|
||||||
prj = d.get('project', prj)
|
|
||||||
pac = d.get('package', pac)
|
|
||||||
if opts.verbose:
|
|
||||||
print "Following to the development space:", prj, "/", pac
|
|
||||||
m = show_package_meta(conf.config['apiurl'], prj, pac)
|
|
||||||
root = ET.fromstring(''.join(m))
|
|
||||||
if not root.findall('person'):
|
|
||||||
print "No dedicated persons in package defined, showing the project persons !"
|
|
||||||
m = show_project_meta(conf.config['apiurl'], prj)
|
|
||||||
root = ET.fromstring(''.join(m))
|
|
||||||
else:
|
else:
|
||||||
raise oscerr.WrongArgs('I need at least one argument.')
|
raise oscerr.WrongArgs('Wrong number of arguments.')
|
||||||
|
|
||||||
if opts.add:
|
if opts.add:
|
||||||
for role in roles:
|
for role in roles:
|
||||||
@ -4362,6 +4345,28 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
# XXX: does it really belong to this command?
|
# XXX: does it really belong to this command?
|
||||||
setDevelProject(conf.config['apiurl'], prj, pac, opts.devel_project)
|
setDevelProject(conf.config['apiurl'], prj, pac, opts.devel_project)
|
||||||
else:
|
else:
|
||||||
|
if pac:
|
||||||
|
m = show_package_meta(conf.config['apiurl'], prj, pac)
|
||||||
|
root = ET.fromstring(''.join(m))
|
||||||
|
if not opts.nodevelproject:
|
||||||
|
while root.findall('devel'):
|
||||||
|
d = root.find('devel')
|
||||||
|
prj = d.get('project', prj)
|
||||||
|
pac = d.get('package', pac)
|
||||||
|
if opts.verbose:
|
||||||
|
print "Following to the development space: %s/%s" % (prj, pac)
|
||||||
|
m = show_package_meta(conf.config['apiurl'], prj, pac)
|
||||||
|
root = ET.fromstring(''.join(m))
|
||||||
|
if not root.findall('person'):
|
||||||
|
if opts.verbose:
|
||||||
|
print "No dedicated persons in package defined, showing the project persons."
|
||||||
|
pac = None
|
||||||
|
m = show_project_meta(conf.config['apiurl'], prj)
|
||||||
|
root = ET.fromstring(''.join(m))
|
||||||
|
else:
|
||||||
|
m = show_project_meta(conf.config['apiurl'], prj)
|
||||||
|
root = ET.fromstring(''.join(m))
|
||||||
|
|
||||||
# showing the maintainers
|
# showing the maintainers
|
||||||
maintainers = {}
|
maintainers = {}
|
||||||
for person in root.findall('person'):
|
for person in root.findall('person'):
|
||||||
|
Loading…
Reference in New Issue
Block a user