pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
25 stars 33 forks source link

Provide operation status to Python callers #164

Open flit opened 3 years ago

flit commented 3 years ago

The Python API must return some indication of whether the requested operation succeeded, partially succeeded, or failed. Individual APIs may handle status differently.

The most difficult API is cache_descriptors(), as this very frequently encounters errors attempting to download one or more PDSCs. Similarly, it is expected to always encounter parse issues (resulting in warnings logs from the Rust code). Perhaps this is best handled with callbacks for different results.

The download_pack_list() API is easier, but can still result in partial success. Thus, a list of successfully downloaded packs should be returned.

This is required to resolve pyocd/pyOCD#1130.