Use ImportError
diff --git a/Lib/tb.py b/Lib/tb.py
index e0f2748..ec63104 100644
--- a/Lib/tb.py
+++ b/Lib/tb.py
@@ -5,7 +5,7 @@
 try:
 	import mac
 	os = mac
-except NameError:
+except ImportError:
 	import posix
 	os = posix
 from stat import *