|
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, basestring): |
126 |
args = [args] |
125 |
ucr = _ucr_from_opts(opts) |
127 |
ucr = _ucr_from_opts(opts) |
126 |
with ucr: |
128 |
with ucr: |
127 |
changes = {} |
129 |
changes = {} |
128 |
for arg in args: |
130 |
for arg in args: |
|
|
131 |
if not isinstance(arg, basestring): |
132 |
raise TypeError("Argument '%s' is not a string." % arg) |
129 |
sep_set = arg.find('=') # set |
133 |
sep_set = arg.find('=') # set |
130 |
sep_def = arg.find('?') # set if not already set |
134 |
sep_def = arg.find('?') # set if not already set |
131 |
if sep_set == -1 and sep_def == -1: |
135 |
if sep_set == -1 and sep_def == -1: |