Fix: --setopt and repo with dots

The "--setopt" have had a problem with repositories with dots in id.
Repository id may contain dots but option name can't. ->
So, the last dot is delimiter and not the first one.

Example:
"--setopt=re.po.option=value " was parsed as repo id "re" and option
"po.option". Correct result would be repo id "re.po" and option
"option".
This commit is contained in:
Jaroslav Rohel 2019-08-28 09:52:40 +02:00 committed by Pavla Kratochvilova
parent 60a8f5e3f0
commit 5b83b19157
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class OptionParser(argparse.ArgumentParser):
logger.warning(_("Setopt argument has no value: %s"), values)
return
k, v = vals
period = k.find('.')
period = k.rfind('.')
if period != -1:
repo = k[:period]
k = k[period+1:]