reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5

Fix for #5852

I've changed all occurences in a code base for that.

Although we probably need to discuss first if we need this everywhere or only in parts of the code run on remote server (i.e. `library/*` etc).