We could drop the spaces padding a keyword argument for PEP-8: `error=e.args[0]`
Any chance of writing this to a logger instead of using print here? Might get lost in some corner cases.