Merge pull request #2843 from PX4/paramssrcparserpython3

has_key is not available in python > 3.0
This commit is contained in:
Lorenz Meier 2015-09-19 10:20:05 +02:00
commit 1412781970
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