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

Add missing sys import to socket_helper.py #19791

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

pablogsal
Copy link
Member

No description provided.

@pablogsal
Copy link
Member Author

There was a missing import that could cause:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/support/socket_helper.py", line 242, in transient_internet
    yield
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/test_nntplib.py", line 320, in setUpClass
    cls.server = cls.NNTP_CLASS(cls.NNTP_HOST,
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 1043, in __init__
    super().__init__(host, port, user, password, readermode,
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 1010, in __init__
    super().__init__(file, host, readermode, timeout)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 330, in __init__
    self.welcome = self._getresp()
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 455, in _getresp
    raise NNTPTemporaryError(resp)
nntplib.NNTPTemporaryError: 400 Permission denied:  Too many unknown commands sent to the server


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/test_nntplib.py", line 330, in setUpClass
    raise unittest.SkipTest(f"{cls} got EOF error on connecting "
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/support/socket_helper.py", line 245, in transient_internet
    sys.stderr.write(denied.args[0] + "\n")
NameError: name 'sys' is not defined

@pablogsal
Copy link
Member Author

I am merging this as is causing a lot of buildbot failures and is a trivial fix.

@pablogsal pablogsal merged commit 5089bcd into python:master Apr 29, 2020
@pablogsal pablogsal deleted the missing_sys branch April 29, 2020 11:32
@serhiy-storchaka
Copy link
Member

Thank you Pablo.

@vstinner
Copy link
Member

I ran pyflakes to check imports and created https://bugs.python.org/issue40443 as a follow-up :-)

@vstinner
Copy link
Member

vstinner commented May 1, 2020

I ran pyflakes to check imports and created https://bugs.python.org/issue40443 as a follow-up :-)

Oh, it was worth it, I found another bug ;-) #19825

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.

5 participants