Rescue SyntaxError when evaluate expression of a condition

https://bugzilla.redhat.com/show_bug.cgi?id=1155284