has_key is not available in python > 3.0

Replacing with 'in'

See https://docs.python.org/3.1/whatsnew/3.0.html#builtins
This commit is contained in:
Thomas Gubler 2015-09-12 15:39:28 +02:00
parent fc47f62b14
commit e713f689bf
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ class SourceParser(object):
m = self.re_px4_parameter_definition.match(line)
if m:
tp, name = m.group(1, 2)
if default_var.has_key(name+'_DEFAULT'):
if (name+'_DEFAULT') in default_var:
defval = default_var[name+'_DEFAULT']
if tp is not None:
# Remove trailing type specifier from numbers: 0.1f => 0.1