mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
add --ignore-nonexistent arg to nvtake
This commit is contained in:
parent
033440da84
commit
2d9bbadd15
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,8 @@ def take():
|
|||
core.add_common_arguments(parser)
|
||||
parser.add_argument('--all', action='store_true',
|
||||
help='take all updates')
|
||||
parser.add_argument('--ignore-nonexistent', action='store_true',
|
||||
help='ignore nonexistent names')
|
||||
parser.add_argument('names', metavar='NAME', nargs='*',
|
||||
help='software name to be updated')
|
||||
args = parser.parse_args()
|
||||
|
@ -39,6 +41,9 @@ def take():
|
|||
try:
|
||||
oldvers[name] = newvers[name]
|
||||
except KeyError:
|
||||
if args.ignore_nonexistent:
|
||||
continue
|
||||
|
||||
logger.critical(
|
||||
"doesn't exist in 'newver' set.", name=name,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue