parameters: (self)
docstring: Parses the command line for bisect options.
docstring_summary: Parses the command line for bisect options.
docstring_tokens: Parses the command line for bisect options .
function: def ParseCommandLine(self):
      """Parses the command line for bisect options."""
      parser = self._CreateCommandLineParser()
      opts = parser.parse_args()
  
      try:
        if (not opts.metric and
            opts.bisect_mode != bisect_utils.BISECT_MODE_RETURN_CODE):
          raise RuntimeError('missing required parameter: --metric')
  
        if opts.bisect_mode != bisect_utils.BISECT_MODE_RETURN_CODE:
          metric_values = opts.metric.split('/')
          if len(metric_values) != 2:
            raise RuntimeError('Invalid metric specified: [%s]' % opts.metric)
          opts.metric = metric_values
  
        opts.truncate_percent = min(max(opts.truncate_percent, 0), 25) / 100.0
  
        for k, v in opts.__dict__.iteritems():
          assert hasattr(self, k), 'Invalid %s attribute in BisectOptions.' % k
          setattr(self, k, v)
      except RuntimeError, e:
        output_string = StringIO.StringIO()
        parser.print_help(file=output_string)
        error_message = '%s\n\n%s' % (e.message, output_string.getvalue())
        output_string.close()
        raise RuntimeError(error_message)
function_tokens: def ParseCommandLine ( self ) : parser = self . _CreateCommandLineParser ( ) opts = parser . parse_args ( ) try : if ( not opts . metric and opts . bisect_mode != bisect_utils . BISECT_MODE_RETURN_CODE ) : raise RuntimeError ( 'missing required parameter: --metric' ) if opts . bisect_mode != bisect_utils . BISECT_MODE_RETURN_CODE : metric_values = opts . metric . split ( '/' ) if len ( metric_values ) != 2 : raise RuntimeError ( 'Invalid metric specified: [%s]' % opts . metric ) opts . metric = metric_values opts . truncate_percent = min ( max ( opts . truncate_percent , 0 ) , 25 ) / 100.0 for k , v in opts . __dict__ . iteritems ( ) : assert hasattr ( self , k ) , 'Invalid %s attribute in BisectOptions.' % k setattr ( self , k , v ) except RuntimeError , e : output_string = StringIO . StringIO ( ) parser . print_help ( file = output_string ) error_message = '%s\n\n%s' % ( e . message , output_string . getvalue ( ) ) output_string . close ( ) raise RuntimeError ( error_message )