[rtems-source-builder commit] sb/options: Split options on the first '=' only.

Chris Johns chrisj at rtems.org
Fri Oct 25 19:56:49 UTC 2019


Module:    rtems-source-builder
Branch:    master
Commit:    fab7197c1b4e3f32574490405c7616d9d7bbd798
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=fab7197c1b4e3f32574490405c7616d9d7bbd798

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sat Oct 26 06:48:24 2019 +1100

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

Split only on the first '=' in an option so BSPOPTS can contain
an '='.

---

 source-builder/sb/options.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py
index 8063734..fa07c53 100644
--- a/source-builder/sb/options.py
+++ b/source-builder/sb/options.py
@@ -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:])



More information about the vc mailing list