def downloadFile(url,dest,silent = False,cookie = None):
    try:
        import urllib2
        file_name = url.split('/')[-1]
        print (file_name) % "Downloading: %s"
        if cookie:
            import cookielib
            cookie_file = os.path.join(os.path.join(xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('profile')),'Cookies'), cookie+'.cookies')
            cj = cookielib.LWPCookieJar()
            if os.path.exists(cookie_file):
                try: cj.load(cookie_file,True)
                except: cj.save(cookie_file,True)
            else: cj.save(cookie_file,True)
            opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
        else:
            opener = urllib2.build_opener()
        opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')]
        u = opener.open(url)
        f = open(dest, 'wb')
        meta = u.info()
        if meta.getheaders("Content-Length"):
            file_size = int(meta.getheaders("Content-Length")[0])
        else: file_size = 'Unknown'
        file_size_dl = 0
        block_sz = 8192
        while True:
            buffer = u.read(block_sz)
            if not buffer: break
            file_size_dl += len(buffer)
            f.write(buffer)
        print "Downloaded: %s %s Bytes" % (file_name, file_size)
        f.close()
        return True
    except Exception:
        print 'Error downloading file ' + url.split('/')[-1]
        #ErrorReport(e)
        if not silent:
            dialog = xbmcgui.Dialog()
            dialog.ok("Phoenix Streams", "Report any errors  at " + supportsite,  "We will try our best to help you")
        return False
dataset/ETHPy150Open mrknow/filmkodi/plugin.video.specto/resources/lib/libraries/phdialogs.py/downloadFile/swapped operands of `%`