Nir Soffer has posted comments on this change.

Change subject: utils: Remove duplicate set non-blocking functions
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/29413/2/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 1144: 
Line 1145: 
Line 1146: def set_non_blocking(fd):
Line 1147:     fl = fcntl.fcntl(fd, fcntl.F_GETFL)
Line 1148:     fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
Can we make this more readable?

    flags = fcntl.fcntl(fd, fcntl.F_GETFL)
    flags |= os.O_NONBLOCK
    fcntl.fcntl(fd, fcntl.F_SETFL, flags)

fcntl api is cryptic enough as is, using too smart code make it harder then 
needed to understand this.


-- 
To view, visit http://gerrit.ovirt.org/29413
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1fd242e8b437e485e45127d083c35957ccecf577
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to