mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 00:30:09 +01:00
build: fix compilation with Python3
has_key() has long been dropped
https://docs.python.org/3.1/whatsnew/3.0.html#builtins
Should still work with anything from 2.3 onwards
https://github.com/NetworkManager/NetworkManager/pull/11
(cherry picked from commit 48402cd526)
This commit is contained in:
parent
263dc2dfd1
commit
b0ad0ff4d7
1 changed files with 2 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ def init_constants(girxml, settings):
|
|||
for setting in settings:
|
||||
setting_type_name = 'NM' + setting.attrib['name'];
|
||||
setting_name_symbol = 'NM_' + setting.attrib[symbol_prefix_key].upper() + '_SETTING_NAME'
|
||||
if constants.has_key(setting_name_symbol):
|
||||
if setting_name_symbol in constants:
|
||||
setting_name = constants[setting_name_symbol]
|
||||
setting_names[setting_type_name] = setting_name
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ outfile.write("""<?xml version=\"1.0\"?>
|
|||
""")
|
||||
|
||||
for settingxml in settings:
|
||||
if settingxml.attrib.has_key('abstract'):
|
||||
if 'abstract' in settingxml.attrib:
|
||||
continue
|
||||
|
||||
new_func = NM.__getattr__(settingxml.attrib['name'])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue