jbardin / scp.py

scp module for paramiko
Other
529 stars 139 forks source link

SCP get fails if given regex in path. #151

Closed oreanroy closed 3 years ago

oreanroy commented 3 years ago

For copying multiple files from a source directory, the SCP get works fine with a file path but fails if regex is given as input. it throws a file not found exception.

File "sms_log_analytics.py", line 33, in collect_logs() File "sms_log_analytics.py", line 27, in collect_logs scp.get(local_path='.', recursive=True, remote_path=str("/home/admin/logs/archived/"+"app."+date+".*")) File "/home/orean/.local/lib/python3.5/site-packages/scp.py", line 238, in get self._recv_all() File "/home/orean/.local/lib/python3.5/site-packages/scp.py", line 388, in _recv_all

remram44 commented 3 years ago

scp doesn't use regexes