From e713f689bf0330604897b6d8e79936c279b0fbd8 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Sat, 12 Sep 2015 15:39:28 +0200 Subject: [PATCH] has_key is not available in python > 3.0 Replacing with 'in' See https://docs.python.org/3.1/whatsnew/3.0.html#builtins --- Tools/px4params/srcparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/px4params/srcparser.py b/Tools/px4params/srcparser.py index c69699cad7..2201fac6dd 100644 --- a/Tools/px4params/srcparser.py +++ b/Tools/px4params/srcparser.py @@ -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