@@ -76,15 +76,15 @@ def open_pathname(pathname, verbose=0):
7676 AppleSingle file"""
7777 try :
7878 refno = Res .FSpOpenResFile (pathname , 1 )
79- except Res .Error as arg :
80- if arg [0 ] in (- 37 , - 39 ):
79+ except Res .Error as error :
80+ if error . args [0 ] in (- 37 , - 39 ):
8181 # No resource fork. We may be on OSX, and this may be either
8282 # a data-fork based resource file or a AppleSingle file
8383 # from the CVS repository.
8484 try :
8585 refno = Res .FSOpenResourceFile (pathname , '' , 1 )
86- except Res .Error as arg :
87- if arg [0 ] != - 199 :
86+ except Res .Error as error :
87+ if error . args [0 ] != - 199 :
8888 # -199 is "bad resource map"
8989 raise
9090 else :
@@ -103,15 +103,15 @@ def resource_pathname(pathname, verbose=0):
103103 try :
104104 refno = Res .FSpOpenResFile (pathname , 1 )
105105 Res .CloseResFile (refno )
106- except Res .Error as arg :
107- if arg [0 ] in (- 37 , - 39 ):
106+ except Res .Error as error :
107+ if error . args [0 ] in (- 37 , - 39 ):
108108 # No resource fork. We may be on OSX, and this may be either
109109 # a data-fork based resource file or a AppleSingle file
110110 # from the CVS repository.
111111 try :
112112 refno = Res .FSOpenResourceFile (pathname , '' , 1 )
113- except Res .Error as arg :
114- if arg [0 ] != - 199 :
113+ except Res .Error as error :
114+ if error . args [0 ] != - 199 :
115115 # -199 is "bad resource map"
116116 raise
117117 else :
0 commit comments