avatartwo / avatar2

Python core of avatar²
Apache License 2.0
518 stars 98 forks source link

targets/openocd: pass along multiple scripts #86

Closed fabianfreyer closed 3 years ago

fabianfreyer commented 3 years ago

The OpenOCD protocol supports passing multiple scripts if a list is passed. However, the OpenOCD target checked the path to the script using os.path.exists(), which does not handle lists of paths.

We now check whether the path is a string or an iterable, and pass that along. While we're there, we also upgrade the in protocols/openocd.py to handle more generic iterables instead of list.

fabianfreyer commented 3 years ago

On second thoughts: since OpenOCD searches for scripts in its scripts folder as well, which avatar2 doesn't have knowledge of, this existence check may not really make sense here, I'll open another PR just removing it.

fabianfreyer commented 3 years ago

See #88