test,examples: fix scripts to avoid 'has_key' for Python 3

'has_key' on Dictionaries is removed from Python3 in favor of 'in'.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2014-10-31 16:34:23 +01:00
parent 4f9e2e9603
commit 0923769285
2 changed files with 7 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ for c_path in settings.ListConnections():
continue
# add IPv4 setting if it doesn't yet exist
if not c_settings.has_key('ipv4'):
if 'ipv4' not in c_settings:
c_settings['ipv4'] = {}
# set the method and change properties