Fix(Core): add exceptions handling in render (not convinced...)

This commit is contained in:
Bertrand Benjamin 2018-12-07 11:21:00 +01:00
parent 79aaa3c5d9
commit 24b421209f
2 changed files with 8 additions and 2 deletions

View File

@ -115,7 +115,10 @@ def mul2tex(left, right):
if OPERATORS[right.node]["precedence"] < OPERATORS['*']["precedence"]:
right_need_parenthesis = True
except AttributeError:
right_ = right.__tex__
try:
right_ = right.__tex__
except AttributeError:
right_ = right
else:
if right_need_parenthesis:
display_time = False

View File

@ -115,7 +115,10 @@ def mul2txt(left, right):
if OPERATORS[right.node]["precedence"] < OPERATORS['*']["precedence"]:
right_need_parenthesis = True
except AttributeError:
right_ = right.__txt__
try:
right_ = right.__txt__
except AttributeError:
right_ = right
else:
if right_need_parenthesis:
display_time = False