407 """ |
407 """ |
408 if self.__idleTimer.isActive(): |
408 if self.__idleTimer.isActive(): |
409 self.__idleTimer.stop() |
409 self.__idleTimer.stop() |
410 |
410 |
411 try: |
411 try: |
412 self.__ftp.quit() |
412 if self.__connected: |
|
413 self.__ftp.quit() |
413 except ftplib.all_errors: |
414 except ftplib.all_errors: |
414 pass # ignore FTP errors because we are shutting down anyway |
415 pass # ignore FTP errors because we are shutting down anyway |
415 self.__connected = False |
416 self.__connected = False |
416 |
417 |
417 def __idleTimeout(self): |
418 def __idleTimeout(self): |