Merged revisions 74672 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74672 | ronald.oussoren | 2009-09-06 12:00:26 +0200 (Sun, 06 Sep 2009) | 1 line
Fix build issues on OSX 10.6 (issue 6802)
........
diff --git a/Lib/plat-mac/macresource.py b/Lib/plat-mac/macresource.py
index f02453b..52e3e89 100644
--- a/Lib/plat-mac/macresource.py
+++ b/Lib/plat-mac/macresource.py
@@ -79,8 +79,8 @@
AppleSingle file"""
try:
refno = Res.FSpOpenResFile(pathname, 1)
- except Res.Error, arg:
- if arg[0] in (-37, -39):
+ except (AttributeError, Res.Error), arg:
+ if isinstance(arg, AttributeError) or arg[0] in (-37, -39):
# No resource fork. We may be on OSX, and this may be either
# a data-fork based resource file or a AppleSingle file
# from the CVS repository.
@@ -106,8 +106,8 @@
try:
refno = Res.FSpOpenResFile(pathname, 1)
Res.CloseResFile(refno)
- except Res.Error, arg:
- if arg[0] in (-37, -39):
+ except (AttributeError, Res.Error), arg:
+ if instance(arg, AttributeError), or arg[0] in (-37, -39):
# No resource fork. We may be on OSX, and this may be either
# a data-fork based resource file or a AppleSingle file
# from the CVS repository.