DeprecationWarning

cerr ron.eggler at gmail.com
Wed Sep 1 11:58:43 EDT 2010


Hi There,

I would like to create an scp handle and download a file from a
client. I have following code:
import sys, os, paramiko,time
from attachment import SCPClient

  transport = paramiko.Transport((prgIP, 22))

  try:
      transport.connect(username='root', password=prgPass)
  except IOError:
      print "Transport connect timed out"
      writelog(" Transport connect timed out. \n")
      sys.exit()

  scp = SCPClient(transport)
  writelog("Succesfully created scp transport handle to get P-file
\n")

  # Create '/tmp/autokernel' if it does not exist.
  if not os.access('./PRGfiles', os.F_OK):
    os.mkdir('./PRGfiles')

  try:
      scp.get("/usr/share/NovaxTSP/P0086_2003.xml","./PRGfiles/
P0086_2003.xml")
      writelog("succesfully downloaded P-file \n")
  except IOError:
      writelog("Downloading P-file failed. \n")

but what i'm getting is this and no file is downloaded...:
/opt/lampp/cgi-bin/attachment.py:243: DeprecationWarning:
BaseException.message has been deprecated as of Python 2.6
  chan.send('\x01'+e.message)
09/01/2010 08:53:56 : Downloading P-file failed.

What does that mean and how do i resolve this?

Thank you!
Ron



More information about the Python-list mailing list