(self, ftpController, host, usrname, passwd, port)
| 368 | |
| 369 | |
| 370 | def connect_thread(self, ftpController, host, usrname, passwd, port): |
| 371 | try: |
| 372 | ftpController.connect_to(host, usrname, passwd, port) |
| 373 | thread_request_queue.put(lambda:self.unlock_status_bar()) |
| 374 | thread_request_queue.put(lambda:self.cont_wait()) |
| 375 | thread_request_queue.put(lambda:self.update_file_list()) |
| 376 | thread_request_queue.put(lambda:self.update_status(message = 'Connected.')) |
| 377 | except: |
| 378 | thread_request_queue.put(lambda:self.unlock_status_bar()) |
| 379 | thread_request_queue.put(lambda:self.update_status_red('Unable to connect, please check what you have entered.')) |
| 380 | #Make sure unable to connect message stays on status bar |
| 381 | thread_request_queue.put(lambda:self.lock_status_bar()) |
| 382 | #Need to focus on the main window and the entry due to a bug in ttk/tkinter (entries don't focis properly after creating and destroying windowless messagebox dialog) |
| 383 | thread_request_queue.put(lambda:self.hostname_entry.focus()) |
| 384 | thread_request_queue.put(lambda:self.master.focus()) |
| 385 | |
| 386 | |
| 387 | def update_file_list(self): |
nothing calls this directly
no test coverage detected