Opened 9 years ago

Closed 2 years ago

#11642 closed Bug Report - General (Fixed)

CommandLineParser cannot handle values being passed to boolean options

Reported by: Raymond Wagner Owned by: Raymond Wagner
Priority: trivial Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no


If an option/value pair is processed, split using a equals ('=') sign, and passed to a boolean option, the parser will attempt to reprocess the two arguments separately, and get caught in an infinite loop.

Change History (2)

comment:1 Changed 9 years ago by Raymond Wagner <rwagner@…>

In 168b8528f39ef8837884f93d8c26f3496868c642/mythtv:

Fix infinite reprocessing loop for booleans in command line parser.

This fixes the immediate issue, by allowing the parser loop to
distinguish between the two scenarios, and only attempt reprocessing if
it makes sense to.

Refs #11642

I'm leaving the ticket open, as we should not be reporting an error
prematurely when we're going to attempt reprocessing. We should probably
also accept various forms of "true" and "false" for booleans, rather
than accept no values.

comment:2 Changed 2 years ago by Stuart Auchterlonie

Milestone: unknown0.27
Resolution: Fixed
Status: newclosed

Closing out old tickets.

Note: See TracTickets for help on using tickets.