[Tutor] glob paramiko
Kent Johnson
kent37 at tds.net
Fri May 8 20:30:22 CEST 2009
On Fri, May 8, 2009 at 1:04 PM, Matt Herzog <msh at blisses.org> wrote:
> Hey All.
>
> All I need to do in this script is scp or sftp a bunch of files to a remote server. This script will run from a cron job eventually.
>
> For whatever reason, paramiko can't cope with a list.
>
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call last)
>
> /Users/msh/<ipython console> in <module>()
>
> AttributeError: 'NoneType' object has no attribute 'put'
It would be helpful to see the full stack trace.
> sftp = paramiko.SFTPClient.from_transport(transport)
>
> os.chdir("/home/fatcat/")
> filepath = '/'
> localpath = glob.glob("*.tab")
> sftp.put(localpath, filepath)
It looks like sftp is None. That is why it has no attribute "put".
Kent
More information about the Tutor
mailing list