I don't think this is valid Python anymore with no exception. We (optionally) require matplotlib >= 1.2.1 now, so you don't need to check for less than v1.x.x.