Gitiles
Code Review
Sign In
gerrit.openbmc.org
/
stefanberger
/
openbmc
/
d8c66bc71e9a0303f1d300b9fa59c60dbfe10056
/
.
/
yocto-poky
/
meta
/
lib
/
oeqa
/
utils
/
network.py
blob: 2768f6c5db89e060edb572a3742fb59a56f48f8b [
file
] [
log
] [
blame
]
import
socket
def
get_free_port
():
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
bind
((
''
,
0
))
addr
=
s
.
getsockname
()
s
.
close
()
return
addr
[
1
]