# Plugging/Unplugging while Python Script Runs

**URL:** <https://forums.blinkstick.com/t/plugging-unplugging-while-python-script-runs/1584>\
**Category:** Support\
**Created:** [September 28, 2022, 12:04am UTC](https://forums.blinkstick.com/t/plugging-unplugging-while-python-script-runs/1584 "2022-09-28T00:04:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh.lisko](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@josh.lisko](https://forums.blinkstick.com/u/josh.lisko)\
**Post date:** [September 28, 2022, 12:04am UTC](https://forums.blinkstick.com/t/plugging-unplugging-while-python-script-runs/1584/1 "2022-09-28T00:04:07Z")

</div>

Hoping someone can help show me the way here. I have a python script that calls blinkstick.find\_all() and stores it in a variable and does some things with the blink sticks it finds. This is all encompassed in a loop that reruns every 5 seconds. When I unplug a blinkstick and plug it back in, the script is not picking it back up in the blinkstick.find\_all() call. I need to kill the script and restart it for the script to pick up the blinkstick that was unplugged and plugged in back up. Any ideas on how to resolve this issue without killing and rerunning the script?

---

<div class="post-metadata">

**Author:** ![josh.lisko](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@josh.lisko](https://forums.blinkstick.com/u/josh.lisko)\
**Post date:** [September 28, 2022, 2:50am UTC](https://forums.blinkstick.com/t/plugging-unplugging-while-python-script-runs/1584/2 "2022-09-28T02:50:08Z")

</div>

welp…it was my own fault…faulty logic in my code!
