New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 812272 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Improve lxc error handling in base_image.py

Project Member Reported by haddowk@chromium.org, Feb 14 2018

Issue description


I had a problem with my code, however base_image could have made some better error messages to help debug.

DEBUG:root:Running 'sudo tar -xvf /usr/local/autotest/containers/base_05.tar.xz -C /usr/local/autotest/containers'
DEBUG:root:Running 'sudo test -e "/usr/local/autotest/containers/base_05"'
Traceback (most recent call last):
  File "/usr/local/autotest/site_utils/lxc.py", line 68, in <module>
    main()
  File "/usr/local/autotest/site_utils/lxc.py", line 62, in main
    image.setup(name=options.name, force_delete=options.force_delete)
  File "/usr/local/autotest/site_utils/lxc/base_image.py", line 108, in setup
    raise exc_info[0], exc_info[1], exc_info[2]
UnboundLocalError: local variable 'exc_info' referenced before assignment

 
Cc: dshi@chromium.org kenobi@chromium.org
Owner: haddowk@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c298aa966e7cfb606b3e7004e10de7f980106876

commit c298aa966e7cfb606b3e7004e10de7f980106876
Author: Keith Haddow <haddowk@chromium.org>
Date: Sat Feb 17 02:48:08 2018

[autotest] Improve error handling in lxc base image.

BUG= chromium:812272 
TEST=local moblab build

Change-Id: I6908abb4f593ec774cbb3945b817eef01b61bb17
Reviewed-on: https://chromium-review.googlesource.com/919521
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>

[modify] https://crrev.com/c298aa966e7cfb606b3e7004e10de7f980106876/site_utils/lxc/base_image.py

Status: Fixed (was: Started)

Sign in to add a comment