Skip to content

Fix undefined names: exc_info --> self.exc_info#4559

Merged
aaltay merged 1 commit intoapache:masterfrom
cclauss:patch-1
Feb 1, 2018
Merged

Fix undefined names: exc_info --> self.exc_info#4559
aaltay merged 1 commit intoapache:masterfrom
cclauss:patch-1

Conversation

@cclauss
Copy link
Copy Markdown

@cclauss cclauss commented Feb 1, 2018

Without this fix exc_info is an undefined name which might result in NameError being raised instead of the desired error.

flake8 testing of https://github.com/apache/beam

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./sdks/python/apache_beam/runners/worker/data_plane.py:185:19: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                  ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:32: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                               ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:45: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                                            ^

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

Without this fix __exc_info__ is an undefined name which might result in NameError being raised instead of the desired error.

flake8 testing of https://github.com/apache/beam

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./sdks/python/apache_beam/runners/worker/data_plane.py:185:19: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                  ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:32: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                               ^
./sdks/python/apache_beam/runners/worker/data_plane.py:185:45: F821 undefined name 'exc_info'
            raise exc_info[0], exc_info[1], exc_info[2]
                                            ^
```
@aaltay
Copy link
Copy Markdown
Member

aaltay commented Feb 1, 2018

LGTM. Thank you.

@aaltay aaltay merged commit 51da92c into apache:master Feb 1, 2018
@cclauss cclauss deleted the patch-1 branch February 1, 2018 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants