mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
scripts: fixed cube version validation from config file
This commit is contained in:
parent
1092cc92be
commit
10efb9590a
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ class Copro:
|
|||
self.mcu_copro = None
|
||||
self.logger = logging.getLogger(self.__class__.__name__)
|
||||
|
||||
def loadCubeInfo(self, cube_dir, cube_version):
|
||||
def loadCubeInfo(self, cube_dir, reference_cube_version):
|
||||
if not os.path.isdir(cube_dir):
|
||||
raise Exception(f'"{cube_dir}" doesn\'t exists')
|
||||
self.cube_dir = cube_dir
|
||||
|
@ -50,7 +50,7 @@ class Copro:
|
|||
if not cube_version or not cube_version.startswith("FW.WB"):
|
||||
raise Exception(f"Incorrect Cube package or version info")
|
||||
cube_version = cube_version.replace("FW.WB.", "", 1)
|
||||
if cube_version != cube_version:
|
||||
if cube_version != reference_cube_version:
|
||||
raise Exception(f"Unsupported cube version")
|
||||
self.version = cube_version
|
||||
|
||||
|
|
Loading…
Reference in a new issue