Homec4science

Prevent error in PhutilArgumentParser when not using standard options

Authored by James Rhodes <jrhodes@redpointsoftware.com.au> on Jan 12 2015, 03:03.

Description

Prevent error in PhutilArgumentParser when not using standard options

Summary: This prevents an exception from being raised when PhutilArgumentParser is being used without the standard options. Elsewhere it checks to make sure 'show-standard-options' is an available option before getting it's value, but here it just calls getArg, which causes an exception to be raised.

Test Plan: Saw this occur when hitting this code path in Omni (which doesn't have the standard options for builtins).

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11279

Details

Committed
James Rhodes <jrhodes@redpointsoftware.com.au>Jan 12 2015, 03:03
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUbd0d806758e5: Fix a possible segfault when parsing JSON containing very large strings
Branches
Unknown
Tags
Unknown

Event Timeline

James Rhodes <jrhodes@redpointsoftware.com.au> committed rPHU698792750d4d: Prevent error in PhutilArgumentParser when not using standard options (authored by James Rhodes <jrhodes@redpointsoftware.com.au>).Jan 12 2015, 03:03