Move definition of unimportant paths to local variables.
Some path names are very specific to ChromeOS environment and rarely
used in factory software. This change moves them to where it is
explicitly used.
BUG=none
TEST=make test
Change-Id: I6c780d7325b2124bd7c548cf962bf4755f4933da
Reviewed-on: https://chromium-review.googlesource.com/374303
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index a439fc8..258f5ed 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -814,9 +814,11 @@
If that file does not exist (which should only be R30 and earlier),
this is a no-op.
"""
- tar_file = os.path.join(paths.DEVICE_STATEFUL_PATH, 'stateful_files.tar.xz')
+ # Path to stateful partition on device.
+ device_stateful_path = '/mnt/stateful_partition'
+ tar_file = os.path.join(device_stateful_path, 'stateful_files.tar.xz')
if os.path.exists(tar_file):
- Spawn(['tar', 'xf', tar_file], cwd=paths.DEVICE_STATEFUL_PATH,
+ Spawn(['tar', 'xf', tar_file], cwd=device_stateful_path,
log=True, check_call=True)
else:
logging.warning('No stateful files at %s', tar_file)