Skip to content

Commit

Permalink
Avoid AttributeError with PL_version_info in swipl <= 8.4.2 (#154)
Browse files Browse the repository at this point in the history
Avoid AttributeError with PL_version_info
  • Loading branch information
DestyNova authored Jun 8, 2024
1 parent 3171d8a commit 8b002d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Arvid Norlander
David Cox
Maximilian Peltzer
Adi Harif
Oisín Mac Fhearaí
2 changes: 1 addition & 1 deletion pyswip/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def check_and_call(*args):
# https://github.com/SWI-Prolog/swipl-devel/issues/900
# https://github.com/SWI-Prolog/swipl-devel/issues/910
try:
if _lib.PL_version_info != None:
if hasattr(_lib, "PL_version_info"):
PL_version = _lib.PL_version_info # swi-prolog > 8.5.2
else:
PL_version = _lib.PL_version # swi-prolog <= 8.5.2
Expand Down

0 comments on commit 8b002d4

Please sign in to comment.