I would do it from scratch I would check that the input is "sane", eg: has 'count' attribute, has __iter__ etc and don't have this exception capturing block at all. 

It serves no purpose to capture the exception only to log it.