mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Old style exceptions are Python 3 syntax errors
This commit is contained in:
parent
bc35251799
commit
41516fbd55
@ -108,7 +108,7 @@ def run_tidy(args, tmpdir, build_path, queue):
|
||||
|
||||
try:
|
||||
subprocess.check_call(invocation, stdin=None, stdout=open(os.devnull, 'wb'), stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError, e:
|
||||
except subprocess.CalledProcessError as e:
|
||||
sys.stdout.write(' '.join(invocation) + '\n')
|
||||
subprocess.call(invocation)
|
||||
global tidy_failures
|
||||
|
||||
@ -633,6 +633,3 @@ elif args.output == 'graphviz':
|
||||
output_graphviz.write(args.file+'_pubs.fv', show_subscriptions=False, engine=engine)
|
||||
else:
|
||||
print('Error: unknown output format '+args.output)
|
||||
|
||||
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ home_position_set = False
|
||||
@vehicle.on_message('MISSION_CURRENT')
|
||||
def listener(self, name, mission_current):
|
||||
global current_sequence, current_sequence_changed
|
||||
if (current_sequence <> mission_current.seq):
|
||||
if (current_sequence != mission_current.seq):
|
||||
current_sequence = mission_current.seq;
|
||||
current_sequence_changed = True
|
||||
print('current mission sequence: %s' % mission_current.seq)
|
||||
@ -135,7 +135,7 @@ def listener(self, name, mission_current):
|
||||
@vehicle.on_message('EXTENDED_SYS_STATE')
|
||||
def listener(self, name, extended_sys_state):
|
||||
global current_landed_state
|
||||
if (current_landed_state <> extended_sys_state.landed_state):
|
||||
if (current_landed_state != extended_sys_state.landed_state):
|
||||
current_landed_state = extended_sys_state.landed_state;
|
||||
|
||||
#Create a message listener for home position fix
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user