[PATCH] D68779: [LNT][NFC] Fix global import in function
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 04:21:18 PST 2019
thopre updated this revision to Diff 233046.
thopre added a comment.
Rebase later in patch series
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68779/new/
https://reviews.llvm.org/D68779
Files:
lnt/lnttool/admin.py
Index: lnt/lnttool/admin.py
===================================================================
--- lnt/lnttool/admin.py
+++ lnt/lnttool/admin.py
@@ -2,17 +2,18 @@
from future import standard_library
standard_library.install_aliases()
import click
+from importlib import import_module
from .common import submit_options
def _load_dependencies():
global yaml, sys, requests, json, os, http
- import yaml
- import sys
- import requests
- import json
- import os
- import http.client
+ yaml = import_module('yaml')
+ sys = import_module('sys')
+ requests = import_module('requests')
+ json = import_module('json')
+ os = import_module('os')
+ http = import_module('http.client')
def _error(msg):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68779.233046.patch
Type: text/x-patch
Size: 748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/02888d70/attachment.bin>
More information about the llvm-commits
mailing list