Use Attr*Error.
New class syntax.
diff --git a/Lib/dircmp.py b/Lib/dircmp.py
index 60afcdd..0c6b4a7 100644
--- a/Lib/dircmp.py
+++ b/Lib/dircmp.py
@@ -13,7 +13,7 @@
 
 # Directory comparison class.
 #
-class dircmp():
+class dircmp:
 	#
 	def new(dd, (a, b)): # Initialize
 		dd.a = a
@@ -128,7 +128,7 @@
 		dd.report()
 		try:
 			x = dd.subdirs
-		except NameError:
+		except AttributeError:
 			return # No subdirectories computed
 		for x in dd.subdirs.keys():
 			print