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

Skip to content

Commit b9e5e14

Browse files
committed
Use auto-start functionality of aetools.TalkTo and aetools.Error for
server-generated errors.
1 parent 977fbf2 commit b9e5e14

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

Mac/scripts/binhextree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ def binhexcompare(source, hqxfile):
7070

7171
def hexbincwprojects(creator):
7272
"""Compact and hexbin all files remembered with a given creator"""
73-
print 'Please start project mgr with signature', creator,'-'
74-
sys.stdin.readline()
7573
try:
76-
mgr = MwShell(creator)
74+
mgr = MwShell(creator, start=1)
7775
except 'foo':
7876
print 'Not handled:', creator
7977
return

Mac/scripts/fullbuild.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@ class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
3232

3333
def buildmwproject(top, creator, projects):
3434
"""Build projects with an MW compiler"""
35-
if not creator in RUNNING:
36-
print 'Please start project mgr with signature', creator,'-'
37-
sys.stdin.readline()
38-
RUNNING.append(creator)
39-
try:
40-
mgr = MwShell(creator)
41-
except 'foo':
42-
print 'Not handled:', creator
43-
return
35+
mgr = MwShell(creator, start=1)
4436
mgr.send_timeout = AppleEvents.kNoTimeOut
4537

4638
for file in projects:
@@ -50,8 +42,8 @@ def buildmwproject(top, creator, projects):
5042
mgr.open(fss)
5143
try:
5244
mgr.Make_Project()
53-
except MacOS.Error, arg:
54-
print '** Failed. Possible error:', arg
45+
except aetools.Error, arg:
46+
print '** Failed:', arg
5547
mgr.Close_Project()
5648
## mgr.quit()
5749

0 commit comments

Comments
 (0)