From 80e452e402f54de2b9bea9722e69022e16d17c7c Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 12 May 2009 00:17:34 -0400 Subject: [PATCH] Fix error messages that are actually errno. Signed-off-by: Edward Z. Yang --- afs/afs.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/afs/afs.pyx b/afs/afs.pyx index 77456b4..29a2442 100644 --- a/afs/afs.pyx +++ b/afs/afs.pyx @@ -19,6 +19,10 @@ cdef extern int pioctl_read(char *dir, afs_int32 op, void *buffer, unsigned shor blob.out_size = size blob.out = buffer code = pioctl(dir, op, &blob, follow) + # This might work with the rest of OpenAFS, but I'm not convinced + # the rest of it is consistent + if code == -1: + raise OSError(errno, strerror(errno)) pyafs_error(code) return code -- 1.7.9.5