fix crash al primo avvio dopo installazione zip

This commit is contained in:
mac12m99
2019-08-06 10:13:07 +02:00
parent 59574159b0
commit f9af12c05c
2 changed files with 6 additions and 3 deletions

View File

@@ -33,8 +33,11 @@ def get_addon_version(with_fix=True):
def get_addon_version_fix():
if not dev_mode():
sha = open(os.path.join(get_runtime_path(), 'last_commit.txt')).readline()
return sha[:7]
try:
sha = open(os.path.join(get_runtime_path(), 'last_commit.txt')).readline()
return sha[:7]
except:
return '??'
else:
return 'DEV'

View File

@@ -76,7 +76,7 @@ def check_addon_init():
# evitiamo di applicare i merge commit
if 'Merge' in commitJson['commit']['message']:
continue
logger.info('aggiornando a' + commitJson['sha'])
logger.info('aggiornando a ' + commitJson['sha'])
alreadyApplied = True
for file in commitJson['files']: