cros clean: fix debugging error
The debug message for handling bind mounts uses an invalid variable:
...
File ".../chromite/cli/cros/cros_clean.py", line 142, in CleanNoBindMount
self.options.path)
AttributeError: 'ArgumentNamespace' object has no attribute 'path'
Linting didn't notice it because the argparse options are dynamically
constructed. It failed on my system because I have a bind mount.
Also improve the debug cros error message to tell people to try
using --debug to get a full traceback.
BUG=chromium:764067
TEST=`cros clean --safe` works again
Change-Id: I7b96008557d7b9232f4668da116e7742028825b9
Reviewed-on: https://chromium-review.googlesource.com/1143682
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cros.py b/scripts/cros.py
index c2c7c7b..6bb7e4e 100644
--- a/scripts/cros.py
+++ b/scripts/cros.py
@@ -75,6 +75,7 @@
raise
else:
logging.error(e)
+ logging.error('(Re-run with --debug for more details.)')
if code is not None:
return code