jbardin/scp.py — pull request #31 by idxxx23 (2014-06-04 11:37:23+00:00)
Title: hotfix _recv_all (scp.get) for python3

* hotfix solve this (scp.get) error ~>

Traceback (most recent call last):
File "/usr/local/lib/python3.3/dist-packages/scp.py", line 353, in _recv_pushd
path = os.path.join(self._recv_dir, parts[2])
File "/usr/lib/python3.3/posixpath.py", line 92, in join
"components.") from None
TypeError: Can't mix strings and bytes in path components.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pm/projects/sandbox/paramiko3.py", line 13, in
scp.get('/tmp/testing/', '/tmp/testing-remote/', recursive=True)
File "/usr/local/lib/python3.3/dist-packages/scp.py", line 143, in get
self._recv_all()
File "/usr/local/lib/python3.3/dist-packages/scp.py", line 274, in _recv_all
command[code](msg[1:])
File "/usr/local/lib/python3.3/dist-packages/scp.py", line 359, in _recv_pushd
raise SCPException('Bad directory format')
scp.SCPException: Bad directory format
[Finished in 2.7s with exit code 1]
[cmd: ['python3', '-u', '/home/pm/projects/sandbox/paramiko3.py']]
[dir: /home/pm/projects/sandbox]
[path: /home/pm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games]

idxxx23 ;)