taotoolkit 2.0.7__tar.gz → 2.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taotoolkit
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: Tao ToolKit
5
5
  Author-email: taotaoli <taotaoli@asrmicro.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "taotoolkit"
7
- version = "2.0.7"
7
+ version = "2.0.8"
8
8
  description = "Tao ToolKit"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -43,7 +43,7 @@ from .tao_camDvt import camDvtMain as camDvtMain, printHelp as camDvtHelp, CamDv
43
43
 
44
44
  from .asrVrf import Vrf
45
45
 
46
- __version__ = "2.0.7"
46
+ __version__ = "2.0.8"
47
47
 
48
48
  __all__ = [
49
49
  "debugCtrl",
@@ -164,10 +164,17 @@ class DevOp:
164
164
  out = self._probeDevices()
165
165
  cache = _load_cache()
166
166
 
167
- # 判断缓存是否命中
168
- if cache is not None and cache.get("serial") in out:
167
+ # 判断缓存是否命中: 显式指定 serial 时, 必须与缓存中的设备一致才可复用
168
+ req_serial = (serial or "").strip()
169
+ if (
170
+ cache is not None
171
+ and cache.get("serial") in out
172
+ and (req_serial == "" or req_serial == cache.get("serial"))
173
+ ):
169
174
  cache_hit = True
170
175
  else:
176
+ if req_serial and cache is not None and req_serial != cache.get("serial"):
177
+ logd(f"[cache] 指定设备 {req_serial} 与缓存设备 {cache.get('serial')} 不一致, 忽略缓存")
171
178
  cache_hit = False
172
179
 
173
180
  if cache_hit and cache is not None:
@@ -652,10 +659,12 @@ class DevOp:
652
659
  self.soc = value
653
660
  self.chipId = key
654
661
  return self.soc
655
- # 不阻塞等 input: 直接失败并说明读了哪些属性, 便于区分"属性缺失"与"adb shell 卡死"
662
+ # chip 不在 chipIdDict 中: 说明该设备不属于 ASR soc, 不退出, 标记为 unknown
663
+ self.soc = "unknown"
664
+ self.chipId = None
656
665
  detail = ", ".join(f"{k}={v or '<空>'}" for k, v in props.items())
657
- eExit(f"get SOC from prop failed ({detail}), expected ASR chip in {list(self.chipIdDict)}; "
658
- f"if all props are empty, adb shell may be stuck, try: adb kill-server")
666
+ logw(f"device is not ASR soc ({detail}), expected ASR chip in {list(self.chipIdDict)}, set soc=unknown")
667
+ return self.soc
659
668
 
660
669
  # ── 相机 ─────────────────────────────────────────────
661
670
 
@@ -821,7 +821,7 @@ class jenkinsTool:
821
821
  if len(out.split("\n")) != 3:
822
822
  dev = DevOp()
823
823
  serial = dev.serial
824
- if dev.soc != None:
824
+ if dev.soc not in (None, "unknown"):
825
825
  boardTag = dev.soc + "_"
826
826
 
827
827
  # pCmd("adb reboot download", showCmd=True, waitDone=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taotoolkit
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: Tao ToolKit
5
5
  Author-email: taotaoli <taotaoli@asrmicro.com>
6
6
  License-Expression: MIT
File without changes
File without changes