@@ -716,7 +716,7 @@ def boolean(self, **kwargs) -> dict: # noqa: D102
716716 from ansys .api .geometry .v0 .bodies_pb2 import BooleanRequest
717717
718718 # Call the gRPC service and build the requests accordingly
719- resp = 0
719+ response_success = 0
720720 serialized_tracker_response = {}
721721 try :
722722 request = BooleanRequest (
@@ -727,7 +727,7 @@ def boolean(self, **kwargs) -> dict: # noqa: D102
727727 if pyansys_geom .USE_TRACKER_TO_UPDATE_DESIGN :
728728 request .keep_other = kwargs ["keep_other" ]
729729 resp = self .stub .Boolean (request = request )
730- print ( "response normal path" , resp )
730+ response_success = resp . empty_result
731731 if pyansys_geom .USE_TRACKER_TO_UPDATE_DESIGN :
732732 serialized_tracker_response = serialize_tracker_command_response (
733733 response = resp .response
@@ -750,8 +750,7 @@ def boolean(self, **kwargs) -> dict: # noqa: D102
750750 all_resp .append (tmp_resp )
751751
752752 if all_resp .count (1 ) > 0 :
753- resp .empty_result = 1
754- print ("response with except and other > 1" , resp )
753+ response_success = 1
755754 elif len (kwargs ["other" ]) == 1 :
756755 resp = self .stub .Boolean (
757756 request = BooleanRequest (
@@ -760,12 +759,11 @@ def boolean(self, **kwargs) -> dict: # noqa: D102
760759 method = kwargs ["method" ],
761760 )
762761 )
763- print ( "response with except and other == 1" , resp )
762+ response_success = resp . empty_result
764763 else :
765764 raise err
766765
767- print ("final response" , resp )
768- if resp .empty_result == 1 :
766+ if response_success == 1 :
769767 raise ValueError (
770768 f"Boolean operation of type '{ kwargs ['method' ]} ' failed: { kwargs ['err_msg' ]} .\n "
771769 f"Involving bodies:{ kwargs ['target' ]} , { kwargs ['other' ]} "
0 commit comments