[PATCH] Improve Python 3 compatibility misc directory
Anmol mishra
anmol.j2020 at gmail.com
Tue Mar 17 20:52:19 UTC 2020
From: Anmol Mishra <anmol.j2020 at gmail.com>
---
misc/tools/boot.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/tools/boot.py b/misc/tools/boot.py
index 265d1b3..78e43bc 100644
--- a/misc/tools/boot.py
+++ b/misc/tools/boot.py
@@ -147,7 +147,7 @@ class bootloader(object):
self.clean = True
def __getitem__(self, key):
- if self.macros.has_key(key) and self.macros[key] != 'None':
+ if key in self.macros and self.macros[key] != 'None':
r = self.macros.expand('%%{%s}' % (key))
if r == '1':
return True
@@ -171,7 +171,7 @@ class bootloader(object):
def check_mandatory_configs(self):
for c in self.get_mandatory_configs():
- if not self.macros.has_key(c):
+ if c not in self.macros:
raise error.general('boot config missing: %s' % (c))
def load_config(self, bootloader, config):
--
2.21.0 (Apple Git-122.2)
More information about the devel
mailing list