Skip to content

Commit 60dec97

Browse files
committed
Allow boolean comparison for PyRealBoolean
1 parent 67cacb6 commit 60dec97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/main/java/oracle/weblogic/deploy/util/PyRealBoolean.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ public PyString __str__() {
4747
return new PyString(toString());
4848
}
4949

50+
@Override
51+
// for Python boolean check, such as bool(abc), or if abc...
52+
public boolean __nonzero__() {
53+
return isTrue;
54+
}
55+
5056
@Override
5157
public boolean equals(Object other) {
5258
if(other instanceof PyRealBoolean) {

0 commit comments

Comments
 (0)