From 10e6619250c9d76e0887f3526b0094d8941a5fa0 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 21 Aug 2017 09:48:50 +0200 Subject: [PATCH] renamed get_group to get_group_meta. --- osc/commandline.py | 6 +++--- osc/core.py | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 228bdd08..9dbccb17 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -909,7 +909,7 @@ class Osc(cmdln.Cmdln): if r: sys.stdout.write(''.join(r)) elif cmd == 'group': - r = get_group(apiurl, group) + r = get_group_meta(apiurl, group) if r: sys.stdout.write(''.join(r)) elif cmd == 'pattern': @@ -1659,7 +1659,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. actionxml = """ """ % \ (project, package, group, role) - if get_group(apiurl, group) == None: + if get_group_meta(apiurl, group) == None: raise oscerr.WrongArgs('osc: an error occured.') return actionxml @@ -1682,7 +1682,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. group = user.replace('group:', '') actionxml = """ """ % \ (project, package, group) - if get_group(apiurl, group) == None: + if get_group_meta(apiurl, group) == None: raise oscerr.WrongArgs('osc: an error occured.') else: actionxml = """ """ % \ diff --git a/osc/core.py b/osc/core.py index d730a469..65f0a44a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -4478,7 +4478,12 @@ def check_existing_maintenance_requests(apiurl, src_project, src_packages, dst_p raise oscerr.UserAbort() return repl == 'y', reqs +# old function for compat reasons. Some plugins may call this function. +# and we do not want to break the plugins. def get_group(apiurl, group): + return get_group_meta(apiurl, group) + +def get_group_meta(apiurl, group): u = makeurl(apiurl, ['group', quote_plus(group)]) try: f = http_GET(u) @@ -4516,7 +4521,7 @@ def get_user_data(apiurl, user, *tags): def get_group_data(apiurl, group, *tags): - meta = get_group(apiurl, group) + meta = get_group_meta(apiurl, group) return _get_xml_data(meta, *tags)