From: Jack Jansen Date: Sat, 11 Aug 2001 22:29:18 +0000 (+0000) Subject: Before asking the finder to start the application (if start=1 is specified), check... X-Git-Tag: v2.2a3~632 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5982221bb5a45de90f58b21e121dd8677d6e25a;p=thirdparty%2FPython%2Fcpython.git Before asking the finder to start the application (if start=1 is specified), check that it isn't incidentally running already. --- diff --git a/Mac/Lib/lib-toolbox/aetools.py b/Mac/Lib/lib-toolbox/aetools.py index 42b6b76b3774..1af761e2d89f 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"""