MCPcopy Create free account
hub / github.com/RainingComputers/whipFTP / connect_thread

Method connect_thread

whipFTP.py:370–384  ·  view source on GitHub ↗
(self, ftpController, host, usrname, passwd, port)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 7

unlock_status_barMethod · 0.95
cont_waitMethod · 0.95
update_file_listMethod · 0.95
update_statusMethod · 0.95
update_status_redMethod · 0.95
lock_status_barMethod · 0.95
connect_toMethod · 0.45

Tested by

no test coverage detected