ConfParserTest: Catch right error for older python version