Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Why does my ftp script quit after couple of hours?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Francesco Bochicchio, post: 3920139"] Try catching the exception inside the main loop, to prevent your program to exit in case of failure: if __name__=='__main__': while True: try: writeExtFile(FILE_PATH,FILE_NAME) uploadFile (FTP_NAME,FTP_USER_NAME,FTP_PASSWD,FTP_FOLDER,FILE_NAME) time.sleep(TIME_DELAY) except: err, det, tb = sys.exc_info() print "ERROR =>", err, det # gives you a description of the occurred failure traceback.print_tb(tb) # this might be needed only for debug Ciao [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Why does my ftp script quit after couple of hours?
Top