From 94a09d55edd7d3c1b53424ee1a39245db751c5e9 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Fri, 16 Dec 2011 09:19:51 -0500 Subject: [PATCH] Mark _init as global in pyafs_error Because _init is later assigned to in the function, new enough versions of cython (67bf84357feabe73612e2a9eef3e48a05e74d76f or so and later, apparently) conclude that it's a local. Unfortunately, that means that the "if _init" is referencing an undeclared variable. See also http://codespeak.net/pipermail/cython-dev/2009-July/006396.html. Signed-off-by: Alex Dehnert --- afs/_util.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/afs/_util.pyx b/afs/_util.pyx index f7f167b..932bdf0 100644 --- a/afs/_util.pyx +++ b/afs/_util.pyx @@ -54,6 +54,7 @@ class AFSException(Exception): return "[%s] %s" % (self.errno, self.strerror) def pyafs_error(code): + global _init if not _init: initialize_ACFG_error_table() initialize_KTC_error_table() -- 1.7.9.5