0
0
Fork 0

fix: is_online_change_possible is a property on SP21, not a method

Live verification against CODESYS V3.5 SP21 Patch 5: calling it raised
'bool is not callable'. Handle both the property (SP21) and callable
(stub-documented) shapes.
This commit is contained in:
Karstein Phobic Nyvold Kvistad 2026-06-12 15:12:33 +02:00
parent 4c5ec53473
commit 52f8746268

View file

@ -15,7 +15,11 @@ try:
if not hasattr(target_app, 'is_online_change_possible'):
raise TypeError("is_online_change_possible is not available on this SP (needs 3.5.10.0+).")
possible = target_app.is_online_change_possible()
# Property on SP21 (returns bool directly); method on the SPs the stub
# documents. Handle both.
possible = target_app.is_online_change_possible
if callable(possible):
possible = possible()
print("Application: %s" % app_name)
print("Online Change Possible: %s" % possible)