mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
scripts: rfr: convert to python 3
Python 2 is no longer maintained. Use python 3 to be up to date and to make it easier to work with utf-8 text. Change-Id: I341f558730caaa9106e8eef4304d67af747c7373 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318760 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
0cd5502935
commit
f9e9e41c7b
@@ -73,7 +73,7 @@ def __rfr_load_ab(path, silent=False):
|
||||
except Exception as err:
|
||||
success = False
|
||||
if not silent:
|
||||
print 'Error: %s' % err
|
||||
print('Error: %s' % err)
|
||||
|
||||
# It's not a very helpful error message I suppose. Eh. We will get more
|
||||
# detail from the __rfr_parse_addrbook() call itself.
|
||||
@@ -151,7 +151,7 @@ def rfr_ab_lookup_single(addr):
|
||||
"""
|
||||
|
||||
# If there's no address book, just pass the addr through.
|
||||
if len(__rfr_address_book.keys()) == 0:
|
||||
if len(list(__rfr_address_book.keys())) == 0:
|
||||
return addr
|
||||
|
||||
lc_addr = addr.lower()
|
||||
@@ -159,7 +159,7 @@ def rfr_ab_lookup_single(addr):
|
||||
if lc_addr in __rfr_address_book:
|
||||
return __rfr_address_book[lc_addr]
|
||||
|
||||
if lc_addr in __rfr_address_book.values():
|
||||
if lc_addr in list(__rfr_address_book.values()):
|
||||
# Return the orignal, un-lowercased.
|
||||
return addr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user