Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import utils
- def callback(query, gid, result, logger):
- if not result or result.has_key('errors'):
- logger.writeLog("Error for gist: " + gid, utils.LOG_LEVEL.ERROR)
- if utils.getVerbose():
- logger.writeLog("With query: ", utils.LOG_LEVEL.ERROR)
- logger.writeLog(query, utils.LOG_LEVEL.ERROR)
- return False
- for org in result['data']['admin']['organizations']['edges']:
- if org['node']['adviseMessage']:
- logger.writeLog("Error for gist: " + gid, utils.LOG_LEVEL.ERROR)
- if utils.getVerbose():
- logger.writeLog("With query: ", utils.LOG_LEVEL.ERROR)
- logger.writeLog(query, utils.LOG_LEVEL.ERROR)
- logger.writeLog(org['node']['adviseMessage']['description'])
- return False
- return True
Add Comment
Please, Sign In to add comment