Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't duplicate Python error messages #8270

Merged
merged 1 commit into from
Jun 3, 2018

Conversation

adamjstewart
Copy link
Member

@adamjstewart adamjstewart commented May 24, 2018

Before

==> Error: NameError: name 'foobar' is not defined
NameError: NameError: name 'foobar' is not defined

/Users/Adam/spack/var/spack/repos/builtin/packages/zstd/package.py:41, in install:
     0         def install(self, spec, prefix):
     1             make('install', 'PREFIX={0}'.format(foobar))

See build log for details:
  /Users/Adam/spack/var/spack/stage/zstd-1.3.0-6bt7wh3xgg242a4saz3oojkcxbixoqar/zstd-1.3.0/spack-build.out

After

==> Error: NameError: name 'foobar' is not defined

/Users/Adam/spack/var/spack/repos/builtin/packages/zstd/package.py:41, in install:
     0         def install(self, spec, prefix):
     1             make('install', 'PREFIX={0}'.format(foobar))

See build log for details:
  /Users/Adam/spack/var/spack/stage/zstd-1.3.0-6bt7wh3xgg242a4saz3oojkcxbixoqar/zstd-1.3.0/spack-build.out

@citibeth
Copy link
Member

Are there any cases where this PR would change things from a single Python error message to none at all?

@adamjstewart
Copy link
Member Author

@citibeth None that I know of, but the unknown is the danger of every PR

@citibeth
Copy link
Member

citibeth commented May 26, 2018 via email

@tgamblin
Copy link
Member

This won’t ever prevent a message from being printed. The context is just a ChildError, and it has the error message and the context. ChildError is in the same file as this change - it’s for wrapping errors from spawned build processes.

@tgamblin tgamblin merged commit d6458a6 into spack:develop Jun 3, 2018
@adamjstewart adamjstewart deleted the fixes/error-dup branch June 3, 2018 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants