e1e3f45530006843db21dc084f2dde2725056168,quickbrowse.py,,,#,569

Before Change


    // XXX For a better solution using sockets:
    // https://github.com/qutebrowser/qutebrowser/blob/v0.10.x/qutebrowser/misc/crashsignal.py//L304-L314
    // http://doc.qt.io/qt-4.8/unix-signals.html
    timer = QTimer()
    timer.start(500)  // You may change this if you wish.
    timer.timeout.connect(lambda: None)  // Let the interpreter run each 500 ms.

    app.exec_()

After Change


        // instead of creating a new window.
        // XXX This should be in a try, and then fall through if no answer.
        urls = args[1:]
        try:
            for url in urls:
                print("Trying to send", url)
                BrowserWindow.send_command("new-tab", url)
            sys.exit(0)
        except FileNotFoundError as msg:
            print("No existing %s process: starting a new one." % progname)
            // Remove the --new-tab argument
            args = args[1:]

    // Return control to the shell before creating the window:
    rc = os.fork()
    if rc:
        sys.exit(0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: akkana/scripts
Commit Name: e1e3f45530006843db21dc084f2dde2725056168
Time: 2018-06-24
Author: akkana@shallowsky.com
File Name: quickbrowse.py
Class Name:
Method Name:


Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_expand_results_callback


Project Name: home-assistant/home-assistant
Commit Name: 884525df33ffb939b354177d6f99ead8ccb28840
Time: 2015-10-25
Author: tom.duijf@gmail.com
File Name: homeassistant/components/media_player/plex.py
Class Name:
Method Name: setup_plexserver