summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-11 22:29:18 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-11 22:29:18 (GMT)
commitb5982221bb5a45de90f58b21e121dd8677d6e25a (patch)
treef3c8a8dc9108249660b705ba28b2be541597b401 /Mac/Lib
parentfb513a20b502c543acca26039df60c13029cf05a (diff)
downloadcpython-b5982221bb5a45de90f58b21e121dd8677d6e25a.zip
cpython-b5982221bb5a45de90f58b21e121dd8677d6e25a.tar.gz
cpython-b5982221bb5a45de90f58b21e121dd8677d6e25a.tar.bz2
Before asking the finder to start the application (if start=1 is specified), check that it isn't incidentally running already.
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/lib-toolbox/aetools.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mac/Lib/lib-toolbox/aetools.py b/Mac/Lib/lib-toolbox/aetools.py
index 42b6b76..1af761e 100644
--- a/Mac/Lib/lib-toolbox/aetools.py
+++ b/Mac/Lib/lib-toolbox/aetools.py
@@ -161,7 +161,10 @@ class TalkTo:
def start(self):
"""Start the application, if it is not running yet"""
- _launch(self.target_signature)
+ try:
+ self.send('ascr', 'noop')
+ except AE.Error:
+ _launch(self.target_signature)
def newevent(self, code, subcode, parameters = {}, attributes = {}):
"""Create a complete structure for an apple event"""