Dependency cleanup: Move in_* and Is* sys APIs to sys_utils.
The in_cros_device, in_chroot, in_qemu, and IsFreon are currently in
different places with inconsistent naming convention. We should move
them to the right module (cros.factory.utils.sys_utils) with same naming
style.
utils.in_qemu => sys_utils.InQEMU
utils.IsFreon => sys_utils.IsFreon
utils.in_cros_device => sys_utils.InCrOSDevice
sys_utils.in_chroot => sys_utils.InChroot
BUG=chromium:403712
TEST=make test
Change-Id: I45c36000b5ebb1b4abf70a9dddddba94e5ef092e
Reviewed-on: https://chromium-review.googlesource.com/320678
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/py/tools/regcode.py b/py/tools/regcode.py
index 40ff5d5..d705617 100755
--- a/py/tools/regcode.py
+++ b/py/tools/regcode.py
@@ -112,7 +112,7 @@
if not code:
if rw_vpd is None:
- if sys_utils.in_chroot():
+ if sys_utils.InChroot():
sys.stderr.write('error: cannot read VPD from chroot; use -u/-g\n')
sys.exit(1)