Kaydet (Commit) b9e5e141 authored tarafından Jack Jansen's avatar Jack Jansen

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

server-generated errors.
üst 977fbf27
...@@ -70,10 +70,8 @@ project_files = {} ...@@ -70,10 +70,8 @@ project_files = {}
def hexbincwprojects(creator): def hexbincwprojects(creator):
"""Compact and hexbin all files remembered with a given creator""" """Compact and hexbin all files remembered with a given creator"""
print 'Please start project mgr with signature', creator,'-'
sys.stdin.readline()
try: try:
mgr = MwShell(creator) mgr = MwShell(creator, start=1)
except 'foo': except 'foo':
print 'Not handled:', creator print 'Not handled:', creator
return return
......
...@@ -32,15 +32,7 @@ RUNNING=[] ...@@ -32,15 +32,7 @@ RUNNING=[]
def buildmwproject(top, creator, projects): def buildmwproject(top, creator, projects):
"""Build projects with an MW compiler""" """Build projects with an MW compiler"""
if not creator in RUNNING: mgr = MwShell(creator, start=1)
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.send_timeout = AppleEvents.kNoTimeOut mgr.send_timeout = AppleEvents.kNoTimeOut
for file in projects: for file in projects:
...@@ -50,8 +42,8 @@ def buildmwproject(top, creator, projects): ...@@ -50,8 +42,8 @@ def buildmwproject(top, creator, projects):
mgr.open(fss) mgr.open(fss)
try: try:
mgr.Make_Project() mgr.Make_Project()
except MacOS.Error, arg: except aetools.Error, arg:
print '** Failed. Possible error:', arg print '** Failed:', arg
mgr.Close_Project() mgr.Close_Project()
## mgr.quit() ## mgr.quit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment