From 6fae0c446b722b7df55515a4400bfec672f25d71 Mon Sep 17 00:00:00 2001 From: Bogdan Zavu Date: Thu, 3 Oct 2024 16:59:14 -0400 Subject: [PATCH] fix output value for bool type --- src/Libraries/DSCPython/CPythonEvaluator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Libraries/DSCPython/CPythonEvaluator.cs b/src/Libraries/DSCPython/CPythonEvaluator.cs index c40aaadf8cd..3796fbecae3 100644 --- a/src/Libraries/DSCPython/CPythonEvaluator.cs +++ b/src/Libraries/DSCPython/CPythonEvaluator.cs @@ -556,7 +556,9 @@ public override object OutputDataMarshaler } } // Special case for big long values: decode them as BigInteger - if (PyInt.IsIntType(pyObj)) + + var unmarshalled = pyObj.AsManagedObject(typeof(object)); + if (unmarshalled is PyInt) { using (var pyLong = PyInt.AsInt(pyObj)) { @@ -570,8 +572,8 @@ public override object OutputDataMarshaler } } } + // Default handling for other Python objects - var unmarshalled = pyObj.AsManagedObject(typeof(object)); if (unmarshalled is PyObject) { using (unmarshalled as PyObject)