Commit 7626da4
committed
fix(ssh): don't raise exception when default ssh keys can't be found
PR canonical#406 broke some end consumers/users of pycloudlib on systems where
1) ssh keys are not set in the pycloudlib.toml and the ssh key is later
set using the Cloud.use_key() method
2) no ssh keys exist at the default paths of '~/.ssh/id_rsa.pub' or
'~/.ssh/id_ed25519.pub'. This commit removes/reverts the error that
gets raised at the Cloud class instantation when those two cases
are true. There was no way for an end user to override/prevent
pycloudlib from erroring out besides for creating a fake ssh key
at one of the two default paths. Now, a warning is just logged instead,
restoring the flexibility pycloudlib preivously provided to end users
for setting their ssh keys.1 parent d856bad commit 7626da4
4 files changed
+50
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
| |||
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
328 | | - | |
| 333 | + | |
329 | 334 | | |
330 | | - | |
| 335 | + | |
| 336 | + | |
331 | 337 | | |
| 338 | + | |
332 | 339 | | |
333 | 340 | | |
334 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments