mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 10:36:17 +01:00
- fix enable channel logic for given channel package
This commit is contained in:
parent
c902d174d8
commit
0b34cb4567
@ -478,18 +478,19 @@ class Osc(cmdln.Cmdln):
|
|||||||
channel = args[1]
|
channel = args[1]
|
||||||
|
|
||||||
query = {'cmd': 'addchannels'}
|
query = {'cmd': 'addchannels'}
|
||||||
if subcmd in ('enablechannels', 'enablechannel'):
|
if opts.enable_all or subcmd in ('enablechannels', 'enablechannel'):
|
||||||
query['cmd'] = 'enablechannel'
|
query['enable_all'] = '1'
|
||||||
if channel is None:
|
if channel is None:
|
||||||
query['cmd'] = 'modifychannels'
|
query['cmd'] = 'modifychannels'
|
||||||
query['enable_all'] = '1'
|
if channel:
|
||||||
else:
|
query['cmd'] = 'enablechannel'
|
||||||
if opts.enable_all and opts.skip_disabled:
|
|
||||||
raise oscerr.WrongOptions('--enable-all and --skip-disabled options are mutually exclusive')
|
if opts.enable_all and opts.skip_disabled:
|
||||||
elif opts.enable_all:
|
raise oscerr.WrongOptions('--enable-all and --skip-disabled options are mutually exclusive')
|
||||||
query['enable_all'] = '1'
|
elif opts.enable_all:
|
||||||
elif opts.skip_disabled:
|
query['enable_all'] = '1'
|
||||||
query['skip_disabled'] = '1'
|
elif opts.skip_disabled:
|
||||||
|
query['skip_disabled'] = '1'
|
||||||
|
|
||||||
print("Looking for channels...")
|
print("Looking for channels...")
|
||||||
url = makeurl(apiurl, ['source', project], query=query)
|
url = makeurl(apiurl, ['source', project], query=query)
|
||||||
|
Loading…
Reference in New Issue
Block a user