The time.sleep() here and in general_io_test() are probably unnecessary if you run 'udevadm settle' after iscsiadm login. With the sleep, it could happen to take more time for udev to work, and fail for no good reason.