ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
45 stars 77 forks source link

utils/ssh: Fix SSHTransferHandle when using SCP #649

Closed douglas-raillard-arm closed 10 months ago

douglas-raillard-arm commented 10 months ago

Using SSHConnection(use_scp=True) lead to an exception:

UnboundLocalError: local variable 'handle' referenced before assignment

This is cause by some (false) cyclic dependency between initialization of SSHTransferHandle and creation of the SCPClient. We can fix that by adding a level of indirection to tie together both objects.