summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-02 14:04:15 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-02 14:04:15 (GMT)
commit2eb4b18f94efbc78818cbc1a21f88bd916b2e6d8 (patch)
treeb5c156a246e931ea83895f714e86dbabff0197e2 /Mac
parent90b8e4d40cc8ec3aed05d5bc6a5afc981e7ebc0c (diff)
downloadcpython-2eb4b18f94efbc78818cbc1a21f88bd916b2e6d8.zip
cpython-2eb4b18f94efbc78818cbc1a21f88bd916b2e6d8.tar.gz
cpython-2eb4b18f94efbc78818cbc1a21f88bd916b2e6d8.tar.bz2
- Slightly better error message in case of syntax errors in the script.
- The applet .rsrc file should be called python.rsrc, it is not based on the applet name.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/buildtools.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Mac/Lib/buildtools.py b/Mac/Lib/buildtools.py
index efc5c47..9825708 100644
--- a/Mac/Lib/buildtools.py
+++ b/Mac/Lib/buildtools.py
@@ -83,8 +83,10 @@ def process(template, filename, destname, copy_codefragment,
fp.close()
try:
code = compile(text, filename, "exec")
- except (SyntaxError, EOFError):
- raise BuildError, "Syntax error in script %s" % `filename`
+ except SyntaxError, arg:
+ raise BuildError, "Syntax error in script %s: %s" % (filename, arg)
+ except EOFError:
+ raise BuildError, "End-of-file in script %s" % (filename,)
# Set the destination file name. Note that basename
# does contain the whole filepath, only a .py is stripped.
@@ -341,7 +343,7 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update
if progress:
progress.label("Copy resources...")
progress.set(20)
- resfilename = '%s.rsrc' % shortname
+ resfilename = 'python.rsrc' # XXXX later: '%s.rsrc' % shortname
try:
output = Res.FSOpenResourceFile(
os.path.join(destname, 'Contents', 'Resources', resfilename),