Fix an except block for py3

"Type, varname" is no longer valid for an except block. Py3 requires that this
is done using "as".