[PATCH] Improve Python 3 compatibility misc directory
Anmol Mishra
anmol.j2020 at gmail.com
Tue Mar 17 21:01:03 UTC 2020
Refer https://docs.python.org/3.1/whatsnew/3.0.html
On Wed, 18 Mar, 2020, 02:22 Anmol mishra, <anmol.j2020 at gmail.com> wrote:
> 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)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200318/c2809104/attachment.html>
More information about the devel
mailing list