def report_feedback(userid): """ """ print "[statistics] Starting feedback send" fbpath = makepath('feedback.json') if not path_exists(fbpath): feedback = [] else: feedback = jsonload(fbpath) if len(feedback) > 0: data = {'feedback' : feedback, 'userid' : userid} network_POST('/stats/report_feedback', data) jsondump(makepath('feedback.json'), []) print '[statistics] Finished feedback send' altpath = makepath('feedback.txt') if path_exists(altpath): feedback = fileload(altpath) data = {'feedback' : feedback, 'userid' : userid} network_POST('/stats/report_legacy_feedback', data) command('rm', altpath)