'Function to comment an APK in Koodous'

def _comment(self, comment):

    headers = {'Authorization': ('Token    %s' % cfg.koodous.koodous_token)}
    try:
        content_file = __sessions__.current.file.data
        sha256 = hashlib.sha256(content_file).hexdigest()
    except:
        self.log('error', 'You    have    no    file    loaded')
    try:
        url = ('%s/%s/comments' % (cfg.koodous.koodous_url, sha256))
        data = {'text': comment}
        response = requests.post(url=url, headers=headers, data=data)
        if (response.status_code == 201):
            self.log('info', 'Comment    made    successfully.')
        else:
            self.log('error', 'Some    problem    saving    the    comment,    please    try    again.')
    except:
        self.log('error', 'Network    problem,    please    try    again.')
