Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filesystem: don't crash if v2/orig_config is called early
When v2/orig_config is called too early, the load_probe_data function will fail because probe_data is None: Traceback (most recent call last): File "subiquity/common/api/server.py", line 164, in handler result = await implementation(**args) File "subiquity/server/controllers/filesystem.py", line 1029, in v2_orig_config_GET model = self.model.get_orig_model() File "subiquity/models/filesystem.py", line 1428, in get_orig_model orig_model.load_probe_data(self._probe_data) File "subiquity/models/filesystem.py", line 1894, in load_probe_data for devname, devdata in probe_data["blockdev"].items(): TypeError: 'NoneType' object is not subscriptable Make sure we don't dereference mdoel._probe_data if it is None. Signed-off-by: Olivier Gayot <[email protected]>
- Loading branch information