diff -r 7c951e3eb5ab tools/pygrub/setup.py --- a/tools/pygrub/setup.py Wed Oct 19 10:53:00 2005 +++ b/tools/pygrub/setup.py Thu Oct 20 11:48:00 2005 @@ -12,7 +12,7 @@ ext2defines = [] cc = new_compiler() cc.add_library("ext2fs") - if cc.has_function("ext2fs_open2"): + if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"): ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) else: sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n")