Yeela Kaplan has posted comments on this change.

Change subject: utils: add a utility to create a socket
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/41893/1/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 1286:     return count * size
Line 1287: 
Line 1288: 
Line 1289: def create_socket(host, port, sslctx=None, timeout=None):
Line 1290:     sock = None
> No need to initialize sock with None. sock will be created by on of the cod
Done
Line 1291:     if sslctx:
Line 1292:         sock = SSL.Connection(sslctx.context)
Line 1293:     else:
Line 1294:         sock = socket.socket(socket.AF_INET,


Line 1293:     else:
Line 1294:         sock = socket.socket(socket.AF_INET,
Line 1295:                              socket.SOCK_STREAM)
Line 1296:     sock.settimeout(timeout)
Line 1297:     sock.connect((host, port))
> A better name would be create_connection - this is mostly like socket.creat
I think it is still creating a socket,
maybe a good solution would be create_connected_socket


-- 
To view, visit https://gerrit.ovirt.org/41893
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib66bf3c1d292cd25bb91ea2bf36c641ab6f68310
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to