def demo(key): client = Client() try: logging.info("Requesting a trigger list") trigger_list = yield client.list_triggers(api_key=key) if trigger_list: logging.info("Success retrieving a trigger list:\n%s\n" % trigger_list) else: logging.error("Problem occurred listing triggers") except Exception, ex: logging.error("Error: %s" % str(ex))