[PATCH] D68779: [LNT][NFC] Fix global import in function
Przemyslaw Wirkus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 06:44:10 PST 2019
PrzemekWirkus marked an inline comment as done.
PrzemekWirkus added inline comments.
================
Comment at: lnt/lnttool/admin.py:8-13
+ yaml = __import__('yaml', globals(), locals())
+ sys = __import__('sys', globals(), locals())
+ requests = __import__('requests', globals(), locals())
+ json = __import__('json', globals(), locals())
+ os = __import__('os', globals(), locals())
+ httplib = __import__('httplib', globals(), locals())
----------------
Thomas,
why are you not using importlib.import_module instead of __import__ ?
Any other reason except for the Python 2 backward compatibility ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68779/new/
https://reviews.llvm.org/D68779
More information about the llvm-commits
mailing list