Commit 26d7cee
committed
bootconfig: fix get_current_bcd_store for PyMI
When PyMI replaced the WMI implementation, the method contract for
`conn.BcdStore.OpenStore` changed, leading to an error:
```bash
ValueError: not enough values to unpack (expected 2, got 1)
```
Under PyMI, the following returns one element if the store is found,
two elements otherwise:
```python
>> conn.BcdStore.OpenStore(File="fake")
(False, None)
>> conn.BcdStore.OpenStore(File="")
(<pymi_object: >,)
```
Fixes: #146
Change-Id: Ibb298e4c92c451946a3ac4cfd2e436b2b3c203cf
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>1 parent 993282d commit 26d7cee
2 files changed
Lines changed: 22 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | 89 | | |
92 | 90 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
96 | 95 | | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
0 commit comments