mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-11-22 19:23:41 +03:00
Allow mcuboot tool to use cbor2 additional to cbor
The mcuboot imgtool uses the python module `cbor`. An equivalent and updated package `cbor2` requires Python 3.7 or newer. The arch packages provide a package `python-cbor2`, but no package for `cbor`. This patch makes it possible to use the system package by adding support for the `cbor2` package additionally to the `cbor` package.
This commit is contained in:
parent
8fee341b86
commit
f057894d26
@ -14,7 +14,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
from enum import Enum
|
||||
import cbor
|
||||
try:
|
||||
import cbor2 as cbor
|
||||
except:
|
||||
import cbor
|
||||
|
||||
|
||||
class SwComponent(int, Enum):
|
||||
|
Loading…
Reference in New Issue
Block a user