setup3k: use getattr instead of hasattr
Note that hasattr is fixed on Python 3, so this is more about being
concise and keeping check-code happy than actual correctness of code.
Ancestors of 54 2 0 Ancestors of 6 and 53 4 2 1 0 Ancestors of 5 and 44 2 0 Descendants of 57 8 Descendants of 5 and 36 7 8 Descendants of 5 and 45 7 8