a98dfa3c17ee07de569772f4a64ca782ed618b9d,hook/zmes_hook_helpers/utils.py,,download_files,#Any#,42

Before Change


        durl = g.config["portal"] + "/index.php?view=image&eid=" + args["eventid"] + "&fid=snapshot" + \
            "&username=" + g.config["user"] + "&password=*****"
        g.logger.debug("Trying to download {}".format(durl))
        input_file= urlopen(url, context=g.ctx)
        with open (filename2, "wb") as output_file:
            output_file.write(input_file.read())

    else:

After Change


    if g.config["http_user"] != "none":
        password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()
        top_level_url = g.config["portal"]
        password_mgr.add_password(None, top_level_url, g.config["http_user"], g.config["http_password"])
        handler = urllib.request.HTTPBasicAuthHandler(password_mgr)
        opener = urllib.request.build_opener(handler, httpshandler)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pliablepixels/zmeventnotification
Commit Name: a98dfa3c17ee07de569772f4a64ca782ed618b9d
Time: 2019-02-28
Author: aasesio@gmail.com
File Name: hook/zmes_hook_helpers/utils.py
Class Name:
Method Name: download_files


Project Name: gyoisamurai/GyoiThon
Commit Name: 4f53bca9b044b20bc4aa8b7719bbbb2984623b3a
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: classifier4gyoithon/GyoiClassifier.py
Class Name:
Method Name:


Project Name: gyoisamurai/GyoiThon
Commit Name: 5765f471197edbf64a57dd2628dcd3051c7ea46c
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: gyoithon.py
Class Name:
Method Name: