PR 2116 - Fix the option parsing to handle both ' ' and '='.

This commit is contained in:
Chris Johns 2013-04-15 10:13:43 +10:00
parent 9994530920
commit c95c2456a4

View File

@ -227,10 +227,10 @@ class command_line:
long_opt = self._long_opts[lo] long_opt = self._long_opts[lo]
if len(los) == 1: if len(los) == 1:
if long_opt[2]: if long_opt[2]:
if arg == len(args) - 1: if arg == len(self.args) - 1:
raise error.general('option requires a parameter: %s' % (lo)) raise error.general('option requires a parameter: %s' % (lo))
arg += 1 arg += 1
value = args[arg] value = self.args[arg]
else: else:
value = None value = None
else: else: