diff --git a/lib/githash.py b/lib/githash.py index 9142cc5f..a60a3924 100644 --- a/lib/githash.py +++ b/lib/githash.py @@ -115,7 +115,7 @@ def tree_hash(path): contents = os.listdir(path) tsize = 0 - to_skip = ('.', '..', '.git', '.DS_Store', '.idea', '.directory') + to_skip = ('.', '..', '.git', '.DS_Store', '.idea', '.directory', 'custom_code.json', 'last_commit.txt') to_skip_ext = ('pyo', 'pyc') pass1 = [] for entry in contents: diff --git a/platformcode/updater.py b/platformcode/updater.py index 08ba2fe0..ac83d005 100644 --- a/platformcode/updater.py +++ b/platformcode/updater.py @@ -222,11 +222,14 @@ def updateFromZip(): destpathname = xbmc.translatePath("special://home/addons/") logger.info("destpathname=%s" % destpathname) - # fix per android -> badZip file - hash = fixZipGetHash(localfilename) - - unzipper = ziptools() - unzipper.extract(localfilename, destpathname) + try: + hash = fixZipGetHash(localfilename) + unzipper = ziptools() + unzipper.extract(localfilename, destpathname) + except Exception as e: + logger.info('Non sono riuscito ad estrarre il file zip') + logger.info(e) + return False # puliamo tutto shutil.rmtree(addonDir)