Fix win32api and win32con definition order.
It would fail on win32 when these modules are not present.
BUG=75902
TEST=none
[email protected]
Review URL: http://codereview.chromium.org/6683028
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77947 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 8e2d1c3..64f4dcb 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -216,9 +216,12 @@
if sys.platform == 'win32':
# Some people don't have the APIs installed. In that case we'll do without.
+ win32api = None
+ win32con = None
try:
- win32api = __import__('win32api')
- win32con = __import__('win32con')
+ # Unable to import 'XX'
+ # pylint: disable=F0401
+ import win32api, win32con
except ImportError:
pass
else: