parsers/src/main/python/utils/worker.py
def call(*popenargs, timeout=None, **kwargs):
    """Run command with arguments.  Wait for command to complete or
    timeout, then return the returncode attribute.

    The arguments are the same as for the Popen constructor.  Example:

    retcode = call(["ls", "-l"])
    """
    with subprocess.Popen(*popenargs, **kwargs) as p:
        try:
            return p.wait(timeout=timeout)
        except subprocess.TimeoutExpired:
            pass
        except:
            p.terminate()  # THIS THE MAIN REASON I CREATE THIS METHOD
            try:
                p.wait(.1)
            except:
                p.kill()
                p.wait()
            raise
Run command with arguments.  Wait for command to complete or
    timeout, then return the returncode attribute.

    The arguments are the same as for the Popen constructor.  Example:

    retcode = call(["ls", "-l"])
    
Run command with arguments.  Wait for command to complete or
timeout, then return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example.


Run command with arguments . Wait for command to complete or timeout then return the returncode attribute . The arguments are the same as for the Popen constructor . Example .
def call(*popenargs, timeout=None, **kwargs):
    with subprocess.Popen(*popenargs, **kwargs) as p:
        try:
            return p.wait(timeout=timeout)
        except subprocess.TimeoutExpired:
            pass
        except:
            p.terminate()  
            try:
                p.wait(.1)
            except:
                p.kill()
                p.wait()
            raise
def call ( * popenargs , timeout = None , ** kwargs ) : with subprocess . Popen ( * popenargs , ** kwargs ) as p : try : return p . wait ( timeout = timeout ) except subprocess . TimeoutExpired : pass except : p . terminate ( ) try : p . wait ( .1 ) except : p . kill ( ) p . wait ( ) raise
Run command with arguments.
Run command with arguments .
"""Run command with arguments.  Wait for command to complete or
    timeout, then return the returncode attribute.

    The arguments are the same as for the Popen constructor.  Example:

    retcode = call(["ls", "-l"])
    """ # THIS THE MAIN REASON I CREATE THIS METHOD
timeout