Skip to content

Commit

Permalink
fix setattr of configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed May 7, 2024
1 parent 3d2f2b6 commit cce7f66
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libpyclingo/clingo/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,10 @@ def __getattr__(self, name: str) -> Union[None, str, "Configuration"]:
def __setattr__(self, name: str, val) -> None:
key = self._get_subkey(name)
if key is None:
super().__setattr__(name, val)
else:
_handle_error(
_lib.clingo_configuration_value_set(self._rep, key, str(val).encode())
)
raise AttributeError(f"get attribute: {name}")
_handle_error(
_lib.clingo_configuration_value_set(self._rep, key, str(val).encode())
)

def description(self, name: str) -> str:
"""
Expand Down

0 comments on commit cce7f66

Please sign in to comment.