/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/option.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-16 02:23:42 UTC
  • mfrom: (7340 work)
  • mto: This revision was merged to the branch mainline in revision 7350.
  • Revision ID: jelmer@jelmer.uk-20190616022342-ihxzayq04x5culzd
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
            self.custom_callback(option, self._param_name, bool_v, parser)
247
247
 
248
248
    def _optparse_callback(self, option, opt, value, parser):
249
 
        v = self.type(value)
 
249
        try:
 
250
            v = self.type(value)
 
251
        except ValueError as e:
 
252
            raise optparse.OptionValueError(
 
253
                'invalid value for option %s: %s' % (option, value))
250
254
        setattr(parser.values, self._param_name, v)
251
255
        if self.custom_callback is not None:
252
256
            self.custom_callback(option, self.name, v, parser)