def forceQuit(self): try: # This part is needed to quit on OS X from osaf.framework.blocks.Block import Block Block.postEventByNameWithSender ("Quit", {}) finally: sys.exit()
def forceQuit(self): try: # This part is needed to quit on OS X from osaf.framework.blocks.Block import Block Block.postEventByNameWithSender("Quit", {}) finally: sys.exit()
def createCollections(collectionNames, view): sidebarCollections = [] for collName in collectionNames: if inTest: # create collections differently for unit tests col = pim.ListCollection("testCollection", itsView=view, displayName=collName.strip('\n')) else: col = Block.postEventByNameWithSender("NewCollection", {}) col.displayName = collName.strip('\n') sidebarCollections.append(col) return sidebarCollections
def execute_frame(option_value): logger.info(option_value) result = "PASSED" if option_value == 'all': testNames = test_modules.keys() else: testNames = [option_value] for name in testNames: if not run_test_by_name(name): result = "FAILED" # Process the Quit message, which will check and cleanup the repository # and do the normal close down of Chandler. Wrap this work in an except # block so we can log failures try: Block.postEventByNameWithSender ("Quit", {}) except Exception, e: logger.exception('Chandler "%s" has failed due to traceback' % name) result = "FAILED"