import IntegrityError before trying to use it

I was getting errors importing wallet transactions --
[2013-07-05 21:02:15,955: ERROR/MainProcess] Task thing.wallet_transactions[2d83cc67-c908-4fc8-85a4-611d759b3f4a] raised exception: NameError("global name 'IntegrityError' is not defined",)