payload = { 'comment[content]': '%s\n#%s' % (comment.get('text'), mingle_id) } response = requests.post(url, data=payload, auth=(auth.get('username'), auth.get('password')), headers=headers) if __name__ == "__main__": bingle = Bingle(debug=debug, picklePath=picklePath) bingle.info("Pretend mode: %s" % options.pretend) # prepare Mingle instance mingle = Mingle(auth, apiBaseUrl) fromTime = bingle.getTimeFromPickle() bugzillaPayload = { 'method': 'Bug.search', 'params': json.dumps([{ 'product': product, 'component': component, 'status': ['UNCONFIRMED', 'NEW'], 'last_change_time': fromTime, }]) } for bug in bingle.getBugEntries(bugzillaPayload): bingle.info("Bug XML: %s" % bug)