This is an archive of the discontinued Mercurial Phabricator instance.

run-tests: catch a Windows specific error when testing for a free socket

Authored by mharbison72 on Jan 18 2021, 1:45 AM.



I'm not sure why this only happens with py3, but this error code doesn't map to
any of the 3 currently being handled, and kills before it can run
any tests when it happens:

OSError: [WinError 10013] An attempt was made to access a socket in a way
forbidden by its access permissions

The documentation[1] says this can happen if another process is bound to the
address with exclusive access. This seems to keep it happy.


Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Jan 18 2021, 1:45 AM
pulkit accepted this revision.Jan 18 2021, 8:51 AM
This revision is now accepted and ready to land.Jan 18 2021, 8:51 AM