Nir Soffer has uploaded a new change for review. Change subject: utils: Remove unused code ......................................................................
utils: Remove unused code Change-Id: Ied92a81bcf9d932e2942e0cb341248eacae61b50 Signed-off-by: Nir Soffer <[email protected]> --- M lib/vdsm/utils.py 1 file changed, 0 insertions(+), 55 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/29534/1 diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py index 2ba5762..76c2a79 100644 --- a/lib/vdsm/utils.py +++ b/lib/vdsm/utils.py @@ -790,15 +790,6 @@ return splits + [l] -def listJoin(elem, *lists): - if lists == []: - return [] - l = list(lists[0]) - for i in lists[1:]: - l += [elem] + i - return l - - def closeOnExec(fd): old = fcntl.fcntl(fd, fcntl.F_GETFD, 0) fcntl.fcntl(fd, fcntl.F_SETFD, old | fcntl.FD_CLOEXEC) @@ -861,52 +852,6 @@ def __unicode__(self): return unicode(self.cmd) - - -class PollEvent(object): - def __init__(self): - self._r, self._w = os.pipe() - self._lock = threading.Lock() - self._isSet = False - - def fileno(self): - return self._r - - def set(self): - with self._lock: - if self._isSet: - return - - while True: - try: - os.write(self._w, "a") - break - except (OSError, IOError) as e: - if e.errno not in (errno.EINTR, errno.EAGAIN): - raise - - self._isSet = True - - def isSet(self): - return self._isSet - - def clear(self): - with self._lock: - if not self._isSet: - return - - while True: - try: - os.read(self._r, 1) - break - except (OSError, IOError) as e: - if e.errno not in (errno.EINTR, errno.EAGAIN): - raise - self._isSet = False - - def __del__(self): - os.close(self._r) - os.close(self._w) def retry(func, expectedException=Exception, tries=None, -- To view, visit http://gerrit.ovirt.org/29534 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied92a81bcf9d932e2942e0cb341248eacae61b50 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
