@@ -206,7 +206,7 @@ def __init__(
206
206
self .result = result
207
207
self .result_str = result_str
208
208
209
- def __equals__ (self , to_compare ):
209
+ def __eq__ (self , to_compare ):
210
210
""" Checks if two ActionResult are the same """
211
211
try :
212
212
# Try to compare - this likely fails when it is compared to a non
@@ -308,7 +308,7 @@ async def arm(self):
308
308
309
309
result = self ._extract_result (response )
310
310
311
- if result .result is not ActionResult .Result .SUCCESS :
311
+ if result .result != ActionResult .Result .SUCCESS :
312
312
raise ActionError (result , "arm()" )
313
313
314
314
@@ -331,7 +331,7 @@ async def disarm(self):
331
331
332
332
result = self ._extract_result (response )
333
333
334
- if result .result is not ActionResult .Result .SUCCESS :
334
+ if result .result != ActionResult .Result .SUCCESS :
335
335
raise ActionError (result , "disarm()" )
336
336
337
337
@@ -356,7 +356,7 @@ async def takeoff(self):
356
356
357
357
result = self ._extract_result (response )
358
358
359
- if result .result is not ActionResult .Result .SUCCESS :
359
+ if result .result != ActionResult .Result .SUCCESS :
360
360
raise ActionError (result , "takeoff()" )
361
361
362
362
@@ -378,7 +378,7 @@ async def land(self):
378
378
379
379
result = self ._extract_result (response )
380
380
381
- if result .result is not ActionResult .Result .SUCCESS :
381
+ if result .result != ActionResult .Result .SUCCESS :
382
382
raise ActionError (result , "land()" )
383
383
384
384
@@ -400,7 +400,7 @@ async def reboot(self):
400
400
401
401
result = self ._extract_result (response )
402
402
403
- if result .result is not ActionResult .Result .SUCCESS :
403
+ if result .result != ActionResult .Result .SUCCESS :
404
404
raise ActionError (result , "reboot()" )
405
405
406
406
@@ -424,7 +424,7 @@ async def shutdown(self):
424
424
425
425
result = self ._extract_result (response )
426
426
427
- if result .result is not ActionResult .Result .SUCCESS :
427
+ if result .result != ActionResult .Result .SUCCESS :
428
428
raise ActionError (result , "shutdown()" )
429
429
430
430
@@ -446,7 +446,7 @@ async def terminate(self):
446
446
447
447
result = self ._extract_result (response )
448
448
449
- if result .result is not ActionResult .Result .SUCCESS :
449
+ if result .result != ActionResult .Result .SUCCESS :
450
450
raise ActionError (result , "terminate()" )
451
451
452
452
@@ -469,7 +469,7 @@ async def kill(self):
469
469
470
470
result = self ._extract_result (response )
471
471
472
- if result .result is not ActionResult .Result .SUCCESS :
472
+ if result .result != ActionResult .Result .SUCCESS :
473
473
raise ActionError (result , "kill()" )
474
474
475
475
@@ -493,7 +493,7 @@ async def return_to_launch(self):
493
493
494
494
result = self ._extract_result (response )
495
495
496
- if result .result is not ActionResult .Result .SUCCESS :
496
+ if result .result != ActionResult .Result .SUCCESS :
497
497
raise ActionError (result , "return_to_launch()" )
498
498
499
499
@@ -536,7 +536,7 @@ async def goto_location(self, latitude_deg, longitude_deg, absolute_altitude_m,
536
536
537
537
result = self ._extract_result (response )
538
538
539
- if result .result is not ActionResult .Result .SUCCESS :
539
+ if result .result != ActionResult .Result .SUCCESS :
540
540
raise ActionError (result , "goto_location()" , latitude_deg , longitude_deg , absolute_altitude_m , yaw_deg )
541
541
542
542
@@ -587,7 +587,7 @@ async def do_orbit(self, radius_m, velocity_ms, yaw_behavior, latitude_deg, long
587
587
588
588
result = self ._extract_result (response )
589
589
590
- if result .result is not ActionResult .Result .SUCCESS :
590
+ if result .result != ActionResult .Result .SUCCESS :
591
591
raise ActionError (result , "do_orbit()" , radius_m , velocity_ms , yaw_behavior , latitude_deg , longitude_deg , absolute_altitude_m )
592
592
593
593
@@ -613,7 +613,7 @@ async def hold(self):
613
613
614
614
result = self ._extract_result (response )
615
615
616
- if result .result is not ActionResult .Result .SUCCESS :
616
+ if result .result != ActionResult .Result .SUCCESS :
617
617
raise ActionError (result , "hold()" )
618
618
619
619
@@ -643,7 +643,7 @@ async def set_actuator(self, index, value):
643
643
644
644
result = self ._extract_result (response )
645
645
646
- if result .result is not ActionResult .Result .SUCCESS :
646
+ if result .result != ActionResult .Result .SUCCESS :
647
647
raise ActionError (result , "set_actuator()" , index , value )
648
648
649
649
@@ -667,7 +667,7 @@ async def transition_to_fixedwing(self):
667
667
668
668
result = self ._extract_result (response )
669
669
670
- if result .result is not ActionResult .Result .SUCCESS :
670
+ if result .result != ActionResult .Result .SUCCESS :
671
671
raise ActionError (result , "transition_to_fixedwing()" )
672
672
673
673
@@ -691,7 +691,7 @@ async def transition_to_multicopter(self):
691
691
692
692
result = self ._extract_result (response )
693
693
694
- if result .result is not ActionResult .Result .SUCCESS :
694
+ if result .result != ActionResult .Result .SUCCESS :
695
695
raise ActionError (result , "transition_to_multicopter()" )
696
696
697
697
@@ -716,7 +716,7 @@ async def get_takeoff_altitude(self):
716
716
717
717
result = self ._extract_result (response )
718
718
719
- if result .result is not ActionResult .Result .SUCCESS :
719
+ if result .result != ActionResult .Result .SUCCESS :
720
720
raise ActionError (result , "get_takeoff_altitude()" )
721
721
722
722
@@ -745,7 +745,7 @@ async def set_takeoff_altitude(self, altitude):
745
745
746
746
result = self ._extract_result (response )
747
747
748
- if result .result is not ActionResult .Result .SUCCESS :
748
+ if result .result != ActionResult .Result .SUCCESS :
749
749
raise ActionError (result , "set_takeoff_altitude()" , altitude )
750
750
751
751
@@ -770,7 +770,7 @@ async def get_maximum_speed(self):
770
770
771
771
result = self ._extract_result (response )
772
772
773
- if result .result is not ActionResult .Result .SUCCESS :
773
+ if result .result != ActionResult .Result .SUCCESS :
774
774
raise ActionError (result , "get_maximum_speed()" )
775
775
776
776
@@ -799,7 +799,7 @@ async def set_maximum_speed(self, speed):
799
799
800
800
result = self ._extract_result (response )
801
801
802
- if result .result is not ActionResult .Result .SUCCESS :
802
+ if result .result != ActionResult .Result .SUCCESS :
803
803
raise ActionError (result , "set_maximum_speed()" , speed )
804
804
805
805
@@ -824,7 +824,7 @@ async def get_return_to_launch_altitude(self):
824
824
825
825
result = self ._extract_result (response )
826
826
827
- if result .result is not ActionResult .Result .SUCCESS :
827
+ if result .result != ActionResult .Result .SUCCESS :
828
828
raise ActionError (result , "get_return_to_launch_altitude()" )
829
829
830
830
@@ -853,6 +853,6 @@ async def set_return_to_launch_altitude(self, relative_altitude_m):
853
853
854
854
result = self ._extract_result (response )
855
855
856
- if result .result is not ActionResult .Result .SUCCESS :
856
+ if result .result != ActionResult .Result .SUCCESS :
857
857
raise ActionError (result , "set_return_to_launch_altitude()" , relative_altitude_m )
858
858
0 commit comments