sb/options: Split options on the first '=' only.

Split only on the first '=' in an option so BSPOPTS can contain
an '='.
This commit is contained in:
Chris Johns
2019-10-26 06:48:24 +11:00
parent 8e38a84868
commit fab7197c1b

View File

@@ -249,7 +249,7 @@ class command_line:
while arg < len(self.args):
a = self.args[arg]
if a.startswith('--'):
los = a.split('=')
los = a.split('=', 1)
lo = los[0]
if lo in self._long_opts:
long_opt = self._long_opts[lo]
@@ -498,7 +498,7 @@ class command_line:
lhs = None
rhs = None
if '=' in self.args[a]:
eqs = self.args[a].split('=')
eqs = self.args[a].split('=', 1)
lhs = eqs[0]
if len(eqs) > 2:
rhs = '='.join(eqs[1:])