platform/dev: add chromite import for internal use in package.
If dev is called as a package, __init__.py can offer a chromite dependency for
it. But __init__.py cannot handle the internal calls.
dev/
__init__.py
A.py
B.py
C.py import package dev, and call functions in A.py, it will succeed.
But if B.py directly calls 'python A.py', or import A to call its funcions, it
will fail.
This CL handles this case.
BUG=chromium:636467
TEST=locally run python cros_update.py, cros_update_progress.py. Run cros
flash.
Change-Id: I69d931b3a20a72a9e33f121f64382004f527cd42
Reviewed-on: https://chromium-review.googlesource.com/375040
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/cros_update_progress.py b/cros_update_progress.py
index 9ab43e3..c911def 100644
--- a/cros_update_progress.py
+++ b/cros_update_progress.py
@@ -23,6 +23,8 @@
import logging
import os
+# only import setup_chromite before chromite import.
+import setup_chromite # pylint: disable=unused-import
try:
from chromite.lib import osutils
except ImportError as e: