Change in vdsm[master]: infra: Add filecontrol module
smizrahi at redhat.com
smizrahi at redhat.com
Mon Dec 8 10:39:49 UTC 2014
Saggi Mizrahi has posted comments on this change.
Change subject: infra: Add filecontrol module
......................................................................
Patch Set 3: Code-Review-1
(2 comments)
http://gerrit.ovirt.org/#/c/35918/3/lib/vdsm/infra/filecontrol/__init__.py
File lib/vdsm/infra/filecontrol/__init__.py:
Line 30: old_flags = fcntl.fcntl(fd, fcntl.F_GETFD)
Line 31: return fcntl.fcntl(fd, fcntl.F_SETFD, old_flags | flags)
Line 32:
Line 33:
Line 34: def set_non_blocking(fd):
There is no way to unset
Also you don't support passing a file object.
You could change it to:
def set_non_blocking(f, value=True):
fd = getattr(f, "fileno", lambda : f)()
Line 35: """Set O_NONBLOCK flag on file descriptor"""
Line 36: return _add_file_flags(fd, os.O_NONBLOCK)
Line 37:
Line 38:
Line 34: def set_non_blocking(fd):
Line 35: """Set O_NONBLOCK flag on file descriptor"""
Line 36: return _add_file_flags(fd, os.O_NONBLOCK)
Line 37:
Line 38:
same as above
Line 39: def set_close_on_exec(fd):
Line 40: """Set O_CLOEXEC flag on file descriptor"""
--
To view, visit http://gerrit.ovirt.org/35918
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4f455711d81e84db600647a2d5d80a5e7cadd5e2
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list