Commit 5344f4e
committed
fix: add long password ipmi error
The given IPMI password can be longer than IPMI expect. In that case the _parse_output method in Ipmitool's
will output the following error "invalid literal for int() with base 16: 'lanplus:'". While if we look at
the line that was taken from IPMI we will see that its "lanplus: password is longer than 20 bytes.".
So the issue is that there is no check for this error and the function skips it and tries to convert
that string from a hex into an integer. I have added an execption, regex check and the match check.
Signed-off-by: FrenkenFlores <saifualdin.evloev@gmail.com>1 parent f0df31e commit 5344f4e
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
0 commit comments