X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/blobdiff_plain/dee660f2c4164dbe8862e0158494dbfe966b8c43..0842a9cde6fc828bf8c3f3840dab0532b303bd22:/afs/afs.pyx 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