Changeset ba0008c in rtems-source-builder


Ignore:
Timestamp:
Mar 20, 2015, 2:57:27 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
1039ac9
Parents:
a83fc54
Message:

sb: Do not accept an extra separate option for --with/--without.

The --with/--without that does not have an extra option was
consuming an extra option on the command line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/options.py

    ra83fc54 rba0008c  
    428428        return self.opts['params']
    429429
    430     def parse_args(self, arg, error = True):
     430    def parse_args(self, arg, error = True, extra = True):
    431431        for a in range(0, len(self.args)):
    432432            if self.args[a].startswith(arg):
     
    440440                    else:
    441441                        rhs = eqs[1]
    442                 else:
     442                elif extra:
    443443                    lhs = self.args[a]
    444444                    a += 1
    445                     if a >= len(self.args):
    446                         return [arg, None]
    447                     rhs = self.args[a]
     445                    if a < len(self.args):
     446                        rhs = self.args[a]
    448447                return [lhs, rhs]
    449448            a += 1
     
    459458            arg_str = '--%s-%s' % (pre, label)
    460459            arg_label = '%s_%s' % (pre, label)
    461             arg = self.parse_args(arg_str, error = False)
     460            arg = self.parse_args(arg_str, error = False, extra = False)
    462461            if arg is not None:
    463462                if arg[1] is  None:
Note: See TracChangeset for help on using the changeset viewer.