Bug 225268 - start-local-buildbot-server should fail gracefully for Python 2
Summary: start-local-buildbot-server should fail gracefully for Python 2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-01 06:33 PDT by Aakash Jain
Modified: 2021-05-01 18:33 PDT (History)
6 users (show)

See Also:


Attachments
[fast-cq] Patch (1.52 KB, patch)
2021-05-01 06:34 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2021-05-01 06:33:30 PDT
start-local-buildbot-server currently fails with a confusing error when run with python2. 

[CISupport]$python start-local-buildbot-server --ews
Setting up virtualenv at /private/var/folders/k1/w4qtfm5j7_v36jwtf1zg50n00000gn/T/tmpuZB6fl ... 
...
Process Process-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "start-local-buildbot-server", line 291, in _start_server
    if check_tcp_port_open('localhost', self._server_pb_port):
  File "start-local-buildbot-server", line 79, in check_tcp_port_open
    except ConnectionRefusedError:
NameError: global name 'ConnectionRefusedError' is not defined


ConnectionRefusedError is a built-in exception in Python 3, but doesn't work in Python 2. Instead of failing with this exception, we should gracefully exit when the script is invoked with Python 2 and print a proper error message.
Comment 1 Aakash Jain 2021-05-01 06:34:31 PDT
Created attachment 427496 [details]
[fast-cq] Patch
Comment 3 EWS 2021-05-01 18:32:21 PDT
Committed r276878 (237224@main): <https://commits.webkit.org/237224@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427496 [details].
Comment 4 Radar WebKit Bug Importer 2021-05-01 18:33:13 PDT
<rdar://problem/77424789>