fix logic error, should only retry import ipdb in exception handling

Signed-off-by: S.J. Huang <opensjh@gmail.com>