mirror of https://github.com/python/cpython
Before asking the finder to start the application (if start=1 is specified), check that it isn't incidentally running already.
This commit is contained in:
parent
fb513a20b5
commit
b5982221bb
|
@ -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"""
|
||||
|
|
Loading…
Reference in New Issue