diff --git a/bimport.py b/bimport.py index a1c88b7..2ec6f58 100644 --- a/bimport.py +++ b/bimport.py @@ -424,7 +424,13 @@ class ImportGLTF2(Operator, ConvertGLTF2_Base, ImportHelper): elapsed_s = "{:.2f}s".format(time.time() - start_time) print("font import gltf finished in " + elapsed_s) - gltf.log.removeHandler(gltf.log_handler) + # acrobatics to not break on MacOS + if hasattr(gltf, "log_handler"): + if hasattr(gltf.log, "removeHandler"): + gltf.log.removeHandler(gltf.log_handler) + elif hasattr(gltf.log, "logger"): + if hasattr(gltf.log.logger, "removeHandler"): + gltf.log.logger.removeHandler(gltf.log_handler) return {'FINISHED'}