def install_pkg(pkg, base_dir='/'):
    """
    install_pkg(pkg, base_dir='/')

    Use the installer utility to install packages in root(/) by default
    """

    install_cmd = (pkg, base_dir) % '/usr/sbin/installer -pkg %s -target %s'
    install_results = shell_tools.run(install_cmd)

    if not install_results['success']:
        raise Exception(install_results['stderr'], install_results['stdout'])
dataset/ETHPy150Open facebook/IT-CPE/code/lib/modules/sys_tools.py/install_pkg/swapped operands of `%`