skip Trackback error for ftp checking

moonhkt moonhkt at gmail.com
Mon Nov 12 04:25:19 EST 2012


On Nov 10, 2:50 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Fri, 09 Nov 2012 20:51:47 -0800, moonhkt wrote:
> > HI All
>
> > How to skip Trackback warning/error when input ftp address is not
> > correct or reject ?
>
> The same way you would skip any other error when you do something wrong:
> catch the exception.
>
> --
> Steven

Thank. Added below.
try:
   ftp = FTP(options.remote_host_address)
except :
      print "Host address not found."
      sys.exit(1)



More information about the Python-list mailing list