Allow equals within import --set value

This commit is contained in:
Jack Wilsdon 2019-04-24 20:04:52 +01:00
parent d7c556f7d1
commit 01bc32e50e
2 changed files with 6 additions and 1 deletions

View file

@ -799,8 +799,11 @@ def _store_dict(option, opt_str, value, parser):
setattr(parser.values, dest, {})
option_values = getattr(parser.values, dest)
# Decode the argument using the platform's argument encoding.
value = util.text_string(value, util.arg_encoding())
try:
key, value = map(lambda s: util.text_string(s), value.split('='))
key, value = value.split('=', 1)
if not (key and value):
raise ValueError
except ValueError:

View file

@ -343,6 +343,8 @@ Fixes:
* :doc:`/plugins/web`: DELETE and PATCH methods are disallowed by default.
Set ``readonly: no`` web config option to enable them.
:bug:`3870`
* Allow equals within ``--set`` value when importing.
:bug:`2984`
For plugin developers: