Only the `name = ...` line should be in the `try`/`except` block, you can use the `try`/`except`/`else` form to acheive that.