Use auto-start functionality of aetools.TalkTo and aetools.Error for

server-generated errors.
This commit is contained in:
Jack Jansen 1996-09-20 15:30:52 +00:00
parent 977fbf271e
commit b9e5e14158
2 changed files with 4 additions and 14 deletions

View File

@ -70,10 +70,8 @@ def binhexcompare(source, hqxfile):
def hexbincwprojects(creator):
"""Compact and hexbin all files remembered with a given creator"""
print 'Please start project mgr with signature', creator,'-'
sys.stdin.readline()
try:
mgr = MwShell(creator)
mgr = MwShell(creator, start=1)
except 'foo':
print 'Not handled:', creator
return

View File

@ -32,15 +32,7 @@ class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
def buildmwproject(top, creator, projects):
"""Build projects with an MW compiler"""
if not creator in RUNNING:
print 'Please start project mgr with signature', creator,'-'
sys.stdin.readline()
RUNNING.append(creator)
try:
mgr = MwShell(creator)
except 'foo':
print 'Not handled:', creator
return
mgr = MwShell(creator, start=1)
mgr.send_timeout = AppleEvents.kNoTimeOut
for file in projects:
@ -50,8 +42,8 @@ def buildmwproject(top, creator, projects):
mgr.open(fss)
try:
mgr.Make_Project()
except MacOS.Error, arg:
print '** Failed. Possible error:', arg
except aetools.Error, arg:
print '** Failed:', arg
mgr.Close_Project()
## mgr.quit()