59ae34807591155f31d2c85fefddb71cfa8e2bd8,lib/streamlit/proxy/Proxy.py,,_print_remote_url,#Any#Any#,51

Before Change


        print("proxy.externalIP not set, attempting autodetect of external IP")

        http_client = None
        try:
            http_client = httpclient.HTTPClient()
            response = http_client.fetch(AWS_CHECK_IP, request_timeout=1)
            external_ip = response.body.strip()
        except (httpclient.HTTPError, RuntimeError) as e:
            LOGGER.error(f"Error connecting to {AWS_CHECK_IP}: {e}")
        finally:
            if http_client is not None:
                http_client.close()

    if external_ip is None:
        print("Did not auto detect external ip. Please go to "
              f"{HELP_DOC} for debugging hints.")
        return

After Change


        LOGGER.debug(f"proxy.externalIP set to {external_ip}")
    else:
        print("proxy.externalIP not set, attempting to autodetect IP")
        external_ip = get_external_ip()
        lan_ip = get_lan_ip()

    timeout_secs = config.get_option("proxy.waitForConnectionSecs")

    if external_ip is None and lan_ip is None:
        print("Did not auto detect external ip. Please go to "
              f"{HELP_DOC} for debugging hints.")
        return

    external_url = get_report_url(external_ip, port, quoted_name)
    lan_url = get_report_url(lan_ip, port, quoted_name)

    print("=============================================================")
    print("Open one of the URLs below in your browser within %s seconds."
          % timeout_secs)
    print("External URL:", external_url)
    print("Internal URL:", lan_url)
    print("=============================================================")

def _launch_web_client(name):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: streamlit/streamlit
Commit Name: 59ae34807591155f31d2c85fefddb71cfa8e2bd8
Time: 2018-09-24
Author: thiagot@gmail.com
File Name: lib/streamlit/proxy/Proxy.py
Class Name:
Method Name: _print_remote_url


Project Name: uber/ludwig
Commit Name: a1a6b7db4b2f751b6f6be9adfb452b200c9a3ee7
Time: 2020-09-20
Author: jimthompson5802@gmail.com
File Name: examples/titanic/simple_model_training.py
Class Name:
Method Name:


Project Name: deepmipt/DeepPavlov
Commit Name: 29ee3e34123191e7b444915b6be56edd8699aa36
Time: 2018-03-22
Author: yurakuratov@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: interact_model