diff --git a/tryton/common/common.py b/tryton/common/common.py index a1599bf2ce..61e24323f8 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -1186,9 +1186,9 @@ def safe_eval(source, data=None): if '__subclasses__' in source: raise ValueError('__subclasses__ not allowed') if hashlib: - key = hashlib.md5(source).hexdigest() + key = hashlib.md5(source).digest() else: - key = md5.new(source).hexdigest() + key = md5.new(source).digest() c = _SAFE_EVAL_CACHE.get(key) if not c: c = compile(source, '', 'eval')