Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb3753d

Browse files
committed
Use Attr*Error.
New class syntax.
1 parent 4dedbf7 commit bb3753d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/dircmp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Directory comparison class.
1515
#
16-
class dircmp():
16+
class dircmp:
1717
#
1818
def new(dd, (a, b)): # Initialize
1919
dd.a = a
@@ -128,7 +128,7 @@ def report_closure(dd): # Print reports on dd and on subdirs
128128
dd.report()
129129
try:
130130
x = dd.subdirs
131-
except NameError:
131+
except AttributeError:
132132
return # No subdirectories computed
133133
for x in dd.subdirs.keys():
134134
print

0 commit comments

Comments
 (0)