def dup(self): raise LibgfapiException("glfs_dup is currently broken (BZ 1311146)") dupfd = api.glfs_dup(self.fd) if not dupfd: err = ctypes.get_errno() raise OSError(err, os.strerror(err)) return File(dupfd, self.originalpath)
def dup(self): """ Return a duplicate of File object. This duplicate File class instance encapsulates a duplicate glfd obtained by invoking glfs_dup(). :raises: OSError on failure """ dupfd = api.glfs_dup(self.fd) if not dupfd: err = ctypes.get_errno() raise OSError(err, os.strerror(err)) return File(dupfd, self.originalpath)
def dup(self): dupfd = api.glfs_dup(self.fd) if not dupfd: err = ctypes.get_errno() raise OSError(err, os.strerror(err)) return File(dupfd, self.originalpath)