mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 21:58:41 +02:00
Merge branch 'clean_xpath' of https://github.com/lethliel/osc
Let's get rid of this old cruft.
This commit is contained in:
16
osc/core.py
16
osc/core.py
@@ -4309,12 +4309,10 @@ def get_review_list(apiurl, project='', package='', byuser='', bygroup='', bypro
|
||||
if package:
|
||||
todo['package'] = package
|
||||
for kind, val in todo.items():
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/target/@%(kind)s=\'%(val)s\''
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\''
|
||||
|
||||
if conf.config['include_request_from_project']:
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath = xpath_join(xpath, xpath_base % {'kind': kind, 'val': val}, op='and', nexpr_parentheses=True)
|
||||
|
||||
if conf.config['verbose'] > 1:
|
||||
@@ -4398,19 +4396,15 @@ def get_request_list(apiurl, project='', package='', req_who='', req_state=('new
|
||||
if package:
|
||||
todo['package'] = package
|
||||
for kind, val in todo.items():
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/target/@%(kind)s=\'%(val)s\''
|
||||
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\''
|
||||
if conf.config['include_request_from_project']:
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath = xpath_join(xpath, xpath_base % {'kind': kind, 'val': val}, op='and', nexpr_parentheses=True)
|
||||
|
||||
if req_type:
|
||||
xpath = xpath_join(xpath, 'action/@type=\'%s\'' % req_type, op='and')
|
||||
for i in exclude_target_projects:
|
||||
xpath = xpath_join(xpath, '(not(action/target/@project=\'%(prj)s\' or ' \
|
||||
'submit/target/@project=\'%(prj)s\'))' % {'prj': i}, op='and')
|
||||
xpath = xpath_join(xpath, '(not(action/target/@project=\'%(prj)s\'))' % {'prj': i}, op='and')
|
||||
|
||||
if conf.config['verbose'] > 1:
|
||||
print('[ %s ]' % xpath)
|
||||
|
Reference in New Issue
Block a user