kcli icon indicating copy to clipboard operation
kcli copied to clipboard

cli: ssh_vm() function refactor

Open guits opened this issue 4 years ago • 2 comments

This removes some duplicated code and make it a bit more readable.

Signed-off-by: Guillaume Abrioux [email protected]

guits avatar May 11 '21 16:05 guits

there s a bit of debate on whether if not x is really the same as if x is None (see https://towardsdatascience.com/python-the-boolean-confusion-f7fc5288f0ce for instance), but regardless, i find the semantic x is None to be easier to read

karmab avatar May 11 '21 21:05 karmab

there s a bit of debate on whether if not x is really the same as if x is None (see https://towardsdatascience.com/python-the-boolean-confusion-f7fc5288f0ce for instance), but regardless, i find the semantic x is None to be easier to read

It's not the only goal of this patch so if you prefer the semantic x is None I can revert those changes. Otherwise, no sweat, feel free to close this PR if you estimate this refactor isn't worthwhile :slightly_smiling_face:

guits avatar May 11 '21 21:05 guits

closing because too much time went (my fault really so sorry about that), feel free to reopen with something more specific

karmab avatar Oct 26 '22 16:10 karmab