Remove <cond> and <val1> or <val2> systax

Use <val1> if <cond> else <val2> instead.
There're more talks:
[0] http://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python
[1] http://www.python.org/dev/peps/pep-0308/

Fixes bug 1188111

Change-Id: I485e674317faf319a26ab30c2c193d8464a7e46e