Writing a jython script for wsadmin, it doesn't seem possible to use boolean values as this simple example shows.
app-stop.py:
isTrue = True
print isTrue
Call:
wsadmin.bat -lang jython -username user -password pw -f D:\app-stop.py
Result:
D:\IBM\WebSphere\AppServer WASX7209I: Connected to process "dmgr" on node OurCellManager using SOAP connector; The type of process is: DeploymentManager WASX7017E: Exception received while running file "D:\app-stop.py"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): File "", line 1, in ? NameError: True
It doesn't matter if I'm writing True
(which should be valid python) or true
. The only way it works is isTrue = 1
. But why is it not possible to use valid python code in jython on wsadmin?