29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
|
|
From e386cd384dffcbd91741357340f19967e79903cb Mon Sep 17 00:00:00 2001
|
||
|
|
From: Anatoli Babenia <anatoli@rainforce.org>
|
||
|
|
Date: Thu, 18 Aug 2022 09:35:51 +0300
|
||
|
|
Subject: [PATCH] cli: Allow `=` in `setopt` values
|
||
|
|
|
||
|
|
Reference:https://github.com/rpm-software-management/dnf/commit/e386cd384dffcbd91741357340f19967e79903cb
|
||
|
|
Conflict:NA
|
||
|
|
---
|
||
|
|
dnf/cli/option_parser.py | 5 +----
|
||
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/dnf/cli/option_parser.py b/dnf/cli/option_parser.py
|
||
|
|
index 41ff16451d..042d5fbbee 100644
|
||
|
|
--- a/dnf/cli/option_parser.py
|
||
|
|
+++ b/dnf/cli/option_parser.py
|
||
|
|
@@ -110,10 +110,7 @@ class _SetoptsCallback(argparse.Action):
|
||
|
|
""" Parse setopts arguments and put them into main_<setopts>
|
||
|
|
and repo_<setopts>."""
|
||
|
|
def __call__(self, parser, namespace, values, opt_str):
|
||
|
|
- vals = values.split('=')
|
||
|
|
- if len(vals) > 2:
|
||
|
|
- logger.warning(_("Setopt argument has multiple values: %s"), values)
|
||
|
|
- return
|
||
|
|
+ vals = values.split('=', maxsplit=1)
|
||
|
|
if len(vals) < 2:
|
||
|
|
logger.warning(_("Setopt argument has no value: %s"), values)
|
||
|
|
return
|
||
|
|
--
|