@@ -206,7 +206,7 @@ def __init__(
206206 self .result = result
207207 self .result_str = result_str
208208
209- def __equals__ (self , to_compare ):
209+ def __eq__ (self , to_compare ):
210210 """ Checks if two ActionResult are the same """
211211 try :
212212 # Try to compare - this likely fails when it is compared to a non
@@ -308,7 +308,7 @@ async def arm(self):
308308
309309 result = self ._extract_result (response )
310310
311- if result .result is not ActionResult .Result .SUCCESS :
311+ if result .result != ActionResult .Result .SUCCESS :
312312 raise ActionError (result , "arm()" )
313313
314314
@@ -331,7 +331,7 @@ async def disarm(self):
331331
332332 result = self ._extract_result (response )
333333
334- if result .result is not ActionResult .Result .SUCCESS :
334+ if result .result != ActionResult .Result .SUCCESS :
335335 raise ActionError (result , "disarm()" )
336336
337337
@@ -356,7 +356,7 @@ async def takeoff(self):
356356
357357 result = self ._extract_result (response )
358358
359- if result .result is not ActionResult .Result .SUCCESS :
359+ if result .result != ActionResult .Result .SUCCESS :
360360 raise ActionError (result , "takeoff()" )
361361
362362
@@ -378,7 +378,7 @@ async def land(self):
378378
379379 result = self ._extract_result (response )
380380
381- if result .result is not ActionResult .Result .SUCCESS :
381+ if result .result != ActionResult .Result .SUCCESS :
382382 raise ActionError (result , "land()" )
383383
384384
@@ -400,7 +400,7 @@ async def reboot(self):
400400
401401 result = self ._extract_result (response )
402402
403- if result .result is not ActionResult .Result .SUCCESS :
403+ if result .result != ActionResult .Result .SUCCESS :
404404 raise ActionError (result , "reboot()" )
405405
406406
@@ -424,7 +424,7 @@ async def shutdown(self):
424424
425425 result = self ._extract_result (response )
426426
427- if result .result is not ActionResult .Result .SUCCESS :
427+ if result .result != ActionResult .Result .SUCCESS :
428428 raise ActionError (result , "shutdown()" )
429429
430430
@@ -446,7 +446,7 @@ async def terminate(self):
446446
447447 result = self ._extract_result (response )
448448
449- if result .result is not ActionResult .Result .SUCCESS :
449+ if result .result != ActionResult .Result .SUCCESS :
450450 raise ActionError (result , "terminate()" )
451451
452452
@@ -469,7 +469,7 @@ async def kill(self):
469469
470470 result = self ._extract_result (response )
471471
472- if result .result is not ActionResult .Result .SUCCESS :
472+ if result .result != ActionResult .Result .SUCCESS :
473473 raise ActionError (result , "kill()" )
474474
475475
@@ -493,7 +493,7 @@ async def return_to_launch(self):
493493
494494 result = self ._extract_result (response )
495495
496- if result .result is not ActionResult .Result .SUCCESS :
496+ if result .result != ActionResult .Result .SUCCESS :
497497 raise ActionError (result , "return_to_launch()" )
498498
499499
@@ -536,7 +536,7 @@ async def goto_location(self, latitude_deg, longitude_deg, absolute_altitude_m,
536536
537537 result = self ._extract_result (response )
538538
539- if result .result is not ActionResult .Result .SUCCESS :
539+ if result .result != ActionResult .Result .SUCCESS :
540540 raise ActionError (result , "goto_location()" , latitude_deg , longitude_deg , absolute_altitude_m , yaw_deg )
541541
542542
@@ -587,7 +587,7 @@ async def do_orbit(self, radius_m, velocity_ms, yaw_behavior, latitude_deg, long
587587
588588 result = self ._extract_result (response )
589589
590- if result .result is not ActionResult .Result .SUCCESS :
590+ if result .result != ActionResult .Result .SUCCESS :
591591 raise ActionError (result , "do_orbit()" , radius_m , velocity_ms , yaw_behavior , latitude_deg , longitude_deg , absolute_altitude_m )
592592
593593
@@ -613,7 +613,7 @@ async def hold(self):
613613
614614 result = self ._extract_result (response )
615615
616- if result .result is not ActionResult .Result .SUCCESS :
616+ if result .result != ActionResult .Result .SUCCESS :
617617 raise ActionError (result , "hold()" )
618618
619619
@@ -643,7 +643,7 @@ async def set_actuator(self, index, value):
643643
644644 result = self ._extract_result (response )
645645
646- if result .result is not ActionResult .Result .SUCCESS :
646+ if result .result != ActionResult .Result .SUCCESS :
647647 raise ActionError (result , "set_actuator()" , index , value )
648648
649649
@@ -667,7 +667,7 @@ async def transition_to_fixedwing(self):
667667
668668 result = self ._extract_result (response )
669669
670- if result .result is not ActionResult .Result .SUCCESS :
670+ if result .result != ActionResult .Result .SUCCESS :
671671 raise ActionError (result , "transition_to_fixedwing()" )
672672
673673
@@ -691,7 +691,7 @@ async def transition_to_multicopter(self):
691691
692692 result = self ._extract_result (response )
693693
694- if result .result is not ActionResult .Result .SUCCESS :
694+ if result .result != ActionResult .Result .SUCCESS :
695695 raise ActionError (result , "transition_to_multicopter()" )
696696
697697
@@ -716,7 +716,7 @@ async def get_takeoff_altitude(self):
716716
717717 result = self ._extract_result (response )
718718
719- if result .result is not ActionResult .Result .SUCCESS :
719+ if result .result != ActionResult .Result .SUCCESS :
720720 raise ActionError (result , "get_takeoff_altitude()" )
721721
722722
@@ -745,7 +745,7 @@ async def set_takeoff_altitude(self, altitude):
745745
746746 result = self ._extract_result (response )
747747
748- if result .result is not ActionResult .Result .SUCCESS :
748+ if result .result != ActionResult .Result .SUCCESS :
749749 raise ActionError (result , "set_takeoff_altitude()" , altitude )
750750
751751
@@ -770,7 +770,7 @@ async def get_maximum_speed(self):
770770
771771 result = self ._extract_result (response )
772772
773- if result .result is not ActionResult .Result .SUCCESS :
773+ if result .result != ActionResult .Result .SUCCESS :
774774 raise ActionError (result , "get_maximum_speed()" )
775775
776776
@@ -799,7 +799,7 @@ async def set_maximum_speed(self, speed):
799799
800800 result = self ._extract_result (response )
801801
802- if result .result is not ActionResult .Result .SUCCESS :
802+ if result .result != ActionResult .Result .SUCCESS :
803803 raise ActionError (result , "set_maximum_speed()" , speed )
804804
805805
@@ -824,7 +824,7 @@ async def get_return_to_launch_altitude(self):
824824
825825 result = self ._extract_result (response )
826826
827- if result .result is not ActionResult .Result .SUCCESS :
827+ if result .result != ActionResult .Result .SUCCESS :
828828 raise ActionError (result , "get_return_to_launch_altitude()" )
829829
830830
@@ -853,6 +853,6 @@ async def set_return_to_launch_altitude(self, relative_altitude_m):
853853
854854 result = self ._extract_result (response )
855855
856- if result .result is not ActionResult .Result .SUCCESS :
856+ if result .result != ActionResult .Result .SUCCESS :
857857 raise ActionError (result , "set_return_to_launch_altitude()" , relative_altitude_m )
858858
0 commit comments