예제 #1
0
파일: coredata.py 프로젝트: kusma/meson
 def validate_option_value(self, option_name, override_value):
     for opts in self.get_all_options():
         if option_name in opts:
             opt = opts[option_name]
             try:
                 return opt.validate_value(override_value)
             except MesonException as e:
                 raise type(e)(('Validation failed for option %s: ' % option_name) + str(e)) \
                     .with_traceback(sys.exc_into()[2])
     raise MesonException('Tried to validate unknown option %s.' % option_name)
예제 #2
0
 def validate_option_value(self, option_name, override_value):
     for opts in self.get_all_options():
         if option_name in opts:
             opt = opts[option_name]
             try:
                 return opt.validate_value(override_value)
             except MesonException as e:
                 raise type(e)(('Validation failed for option %s: ' % option_name) + str(e)) \
                     .with_traceback(sys.exc_into()[2])
     raise MesonException('Tried to validate unknown option %s.' % option_name)