use simple ast+operator based calculator for evaluating Vercode Operation

This commit is contained in:
Michael Pöhn 2018-05-22 13:08:14 +02:00
parent 79a022400f
commit 24b20d7668
2 changed files with 25 additions and 1 deletions

View file

@ -434,7 +434,7 @@ def checkupdates_app(app):
.format(field=app.VercodeOperation))
oldvercode = str(int(vercode))
op = app.VercodeOperation.replace("%c", oldvercode)
vercode = str(eval(op))
vercode = str(common.calculate_math_string(op))
logging.debug("Applied vercode operation: %s -> %s" % (oldvercode, vercode))
if version and any(version.startswith(s) for s in [