|
122 |
Set config registry variables in args. |
122 |
Set config registry variables in args. |
123 |
Args is an array of strings 'key=value' or 'key?value'. |
123 |
Args is an array of strings 'key=value' or 'key?value'. |
124 |
""" |
124 |
""" |
|
|
125 |
if isinstance(args, str): |
126 |
args = [args] |
127 |
if not isinstance(args, list): |
128 |
raise TypeError |
125 |
ucr = _ucr_from_opts(opts) |
129 |
ucr = _ucr_from_opts(opts) |
126 |
with ucr: |
130 |
with ucr: |
127 |
changes = {} |
131 |
changes = {} |
128 |
for arg in args: |
132 |
for arg in args: |
|
|
133 |
if not isinstance(arg, str): |
134 |
raise TypeError |
129 |
sep_set = arg.find('=') # set |
135 |
sep_set = arg.find('=') # set |
130 |
sep_def = arg.find('?') # set if not already set |
136 |
sep_def = arg.find('?') # set if not already set |
131 |
if sep_set == -1 and sep_def == -1: |
137 |
if sep_set == -1 and sep_def == -1: |