Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _set_option(self, btor, name, value):
available_options = {pyboolector.BoolectorOpt(btor, io).lng : io
for io in self.internal_options}
try:
btor.Set_opt(available_options[name], value)
except TypeError:
raise PysmtValueError("Error setting the option '%s=%s'" \
% (name,value))
except pyboolector.BoolectorException:
raise PysmtValueError("Error setting the option '%s=%s'" \
% (name,value))
except KeyError:
raise PysmtValueError("Unable to set non-existing option '%s'. "
"The accepted options options are: %s" \
% (name, ", ".join(pyboolector.BoolectorOpt(btor, io).lng
for io in self.internal_options)))
def _set_option(self, btor, name, value):
available_options = {pyboolector.BoolectorOpt(btor, io).lng : io
for io in self.internal_options}
try:
btor.Set_opt(available_options[name], value)
except TypeError:
raise PysmtValueError("Error setting the option '%s=%s'" \
% (name,value))
except pyboolector.BoolectorException:
raise PysmtValueError("Error setting the option '%s=%s'" \
% (name,value))
except KeyError:
raise PysmtValueError("Unable to set non-existing option '%s'. "
"The accepted options options are: %s" \
% (name, ", ".join(pyboolector.BoolectorOpt(btor, io).lng
for io in self.internal_options)))