From e30498458e627787ecfe93537b372eb2e6251cfd Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 26 Jun 2019 21:15:06 +0200 Subject: [PATCH] workaround updater --- platformcode/updater.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformcode/updater.py b/platformcode/updater.py index 454e47b8..399dcebf 100644 --- a/platformcode/updater.py +++ b/platformcode/updater.py @@ -136,6 +136,7 @@ def check_addon_init(): def calcCurrHash(): from lib import githash treeHash = githash.tree_hash(addonDir).hexdigest() + logger.info('tree hash: ' + treeHash) commits = loadCommits() page = 1 while commits and page <= maxPage: @@ -156,7 +157,10 @@ def calcCurrHash(): else: logger.info('Non sono riuscito a trovare il commit attuale, scarico lo zip') updateFromZip() - calcCurrHash() + # se ha scaricato lo zip si trova di sicuro all'ultimo commit + localCommitFile = open(addonDir + trackingFile, 'w') + localCommitFile.write(commits[0]['sha']) + localCommitFile.close() # https://gist.github.com/noporpoise/16e731849eb1231e86d78f9dfeca3abc Grazie!