fix settings jessie,stretch as default for distribution option (#26056)
This commit is contained in:
parent
a73fbda28c
commit
cc59d05aae
|
@ -16,8 +16,10 @@ class MultipleOption(Option):
|
|||
|
||||
def take_action(self, action, dest, opt, value, values, parser):
|
||||
if action == "extend":
|
||||
lvalue = value.split(",")
|
||||
values.ensure_value(dest, []).extend(lvalue)
|
||||
values_list = values.ensure_value(dest, [])
|
||||
for lvalue in value.split(','):
|
||||
if not lvalue in values_list:
|
||||
values_list.append(lvalue)
|
||||
else:
|
||||
Option.take_action(
|
||||
self, action, dest, opt, value, values, parser)
|
||||
|
@ -34,7 +36,7 @@ def parse_cmdline():
|
|||
parser.add_option("-d", "--distribution",
|
||||
action="extend", type="string",
|
||||
dest="distrib", metavar='DISTRIBUTIONS',
|
||||
default='jessie,stretch',
|
||||
default=[],
|
||||
help="DISTRIBUTIONS: stretch, jessie, wheezy and / or squeeze")
|
||||
parser.add_option("-f", "--force", action="store_true",
|
||||
dest="force", default=False,
|
||||
|
@ -72,7 +74,7 @@ def parse_cmdline():
|
|||
parser.error("you shouldn't use argument when cleaning")
|
||||
|
||||
if len(args) and not options.distrib:
|
||||
parser.error("you should set option --distribution")
|
||||
options.distrib = ['jessie', 'stretch']
|
||||
|
||||
if options.repositories:
|
||||
for r in options.repositories:
|
||||
|
|
Loading…
Reference in New Issue