Once more unto the obsolete python: exception and ternary edition.

Removed pseudo-ternary if/else assignment and "except X as e" from all the new
code, since those, too, are forbidden to us by our build scripts (for now).