Skip to content

Commit eccb25f

Browse files
authored
Work around pyjnius mishandling of bool args (#118)
Bools are now auto-converted to Integers instead of Booleans, so we have to perform the conversion explicitly now. Tracked upstream in kivy/pyjnius#602 .
1 parent db26247 commit eccb25f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ashlar/reg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
import jnius
4040

41+
JBoolean = jnius.autoclass('java.lang.Boolean')
4142
DebugTools = jnius.autoclass('loci.common.DebugTools')
4243
IFormatReader = jnius.autoclass('loci.formats.IFormatReader')
4344
MetadataRetrieve = jnius.autoclass('ome.xml.meta.MetadataRetrieve')
@@ -227,8 +228,8 @@ def _init_metadata(self):
227228
# For multi-scene .CZI files, we need raw tiles instead of the
228229
# auto-stitched mosaic and we don't want labels or overview images
229230
options = DynamicMetadataOptions()
230-
options.setBoolean('zeissczi.autostitch', False)
231-
options.setBoolean('zeissczi.attachments', False)
231+
options.setBoolean('zeissczi.autostitch', JBoolean(False))
232+
options.setBoolean('zeissczi.attachments', JBoolean(False))
232233
self._reader.setMetadataOptions(options)
233234
self._reader.setId(self.path)
234235

0 commit comments

Comments
 (0)