More informative error when command fails

Instead of:

    ERROR|dox.cmd|Operation failed, aborting dox.

we get:

    ERROR|dox.cmd|Operation failed, aborting dox.
    Traceback (most recent call last):
      File "/Users/marca/dev/git-repos/dox/dox/cmd.py", line 99, in run_dox
        map(run, images)
      File "/Users/marca/dev/git-repos/dox/dox/runner.py", line 209, in run
        self.build_test_image(image, command)
      File "/Users/marca/dev/git-repos/dox/dox/runner.py", line 157, in build_test_image
        shutil.copy(add_file, os.path.join(tempd, add_file))
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
        copyfile(src, dst)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
        with open(src, 'rb') as fsrc:
    IOError: [Errno 2] No such file or directory: 'tests_require.txt'

Change-Id: Icdb25ae2c2f06ffab416d215a7f8b360f9b65c1e
This commit is contained in:
Marc Abramowitz 2015-05-13 08:21:11 -07:00
parent a02c3f7742
commit d0d15f966c
1 changed files with 2 additions and 2 deletions

View File

@ -97,8 +97,8 @@ def run_dox(args, images, command, image_name):
run = functools.partial(dox.runner.Runner(args, image_name).run,
command=command)
map(run, images)
except Exception:
logger.error("Operation failed, aborting dox.", exc_info=args.debug)
except Exception as e:
logger.error("Operation failed, aborting dox.", exc_info=e)
return 1