def THREADdo_it(): try: external_ip = HydrusNATPunch.GetExternalIP() external_ip_text = 'External IP: {}'.format(external_ip) except Exception as e: external_ip_text = 'Error finding external IP: ' + str(e) QP.CallAfter(qt_code, external_ip_text)
def work_callable(): try: external_ip = HydrusNATPunch.GetExternalIP() external_ip_text = 'External IP: {}'.format(external_ip) except Exception as e: external_ip_text = 'Error finding external IP: ' + str(e) return external_ip_text