bb13ed45f8
The startup init (server booted with the card already in the reader) equips the card and reads the ICCID itself, but never created server.net_state - only /api/command equip and the auto-equip worker did. With a card present at boot the monitor stayed empty, net-sim responses carried net_state: null and the panel only started updating after pressing Refresh (which lazily created the state). Fix: - factor _netstate_read(app) / _netstate_install() / _netstate_init() in server.py; _apply_equipped_card uses _netstate_init() - __main__ startup: read the monitored EFs in the same CAT-free window as the ICCID and install the state once the server object exists - _netstate_ensure() lazily initializes the state in the net-sim/event hooks so any equip path predating the monitor cannot leave it dead - netSimRun falls back to netStateFetch() when a response has no net_state - tests: tests/test_netstate_server.py (candidate order, record vs transparent, absent files, install, ensure); SW cache simple-v204
18 lines
613 B
TOML
18 lines
613 B
TOML
[build-system]
|
|
requires = ["setuptools", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "pysim-simple-server"
|
|
version = "2.7.1"
|
|
description = "HTTP REST server wrapping pysim for the SIMple PWA"
|
|
requires-python = ">=3.8"
|
|
# pysim is a git-only dependency installed explicitly by setup.bat/setup.sh.
|
|
# Declaring it here would make pip resolve its full tree (including the SMPP
|
|
# bridge -> Twisted -> twisted-iocpsupport, which needs MSVC on Windows).
|
|
|
|
[project.scripts]
|
|
pysim-simple-server = "pysim_simple_server.__main__:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["pysim_simple_server*"] |