コード例 #1
0
ファイル: udev.py プロジェクト: fabiand/blivet
def udev_trigger(subsystem=None, action="add", name=None):
    argv = ["trigger", "--action=%s" % action]
    if subsystem:
        argv.append("--subsystem-match=%s" % subsystem)
    if name:
        argv.append("--sysname-match=%s" % name)

    util.run_program(["udevadm"] + argv)
    udev_settle()
コード例 #2
0
ファイル: kmeans.py プロジェクト: 5775ms/partitionfinder
def run_rates(command):
    global _tiger_binary
    if _tiger_binary is None:
        _tiger_binary = util.find_program(_binary_name)

    try:
        util.run_program(_tiger_binary, command)
    except util.ExternalProgramError:
        log.error("fast_TIGER did not execute successfully")
        log.error("fast_TIGER output follows, in case it's helpful for \
            finding the problem")
        log.error("You probably just need to recompile the fast_TIGER \
            code for your system. But please note that this is an \
            unsupported option. For empirical work we recommend using \
            entropy calculations for site rates, which is the default \
            behaviour for the kmeans algorithm in PF2.")
        raise
コード例 #3
0
ファイル: raxml.py プロジェクト: alephreish/partitionfinder
def run_raxml_pthreads(command, cpus):
    global _raxml_pthreads_binary
    if _raxml_pthreads_binary is None:
        _raxml_pthreads_binary = util.find_program(_binary_name_pthreads)
    command = " ".join([command, "-T", str(cpus), " "])
    util.run_program(_raxml_pthreads_binary, command)
コード例 #4
0
ファイル: raxml.py プロジェクト: alephreish/partitionfinder
def run_raxml(command):
    global _raxml_binary
    if _raxml_binary is None:
        _raxml_binary = util.find_program(_binary_name)
    util.run_program(_raxml_binary, command)
コード例 #5
0
def run_raxml_pthreads(command, cpus):
    global _raxml_pthreads_binary
    if _raxml_pthreads_binary is None:
        _raxml_pthreads_binary = util.find_program(_binary_name_pthreads)
    command = " ".join([command, "-T", str(cpus), " "])
    util.run_program(_raxml_pthreads_binary, command)
コード例 #6
0
def run_raxml(command):
    global _raxml_binary
    if _raxml_binary is None:
        _raxml_binary = util.find_program(_binary_name)
    util.run_program(_raxml_binary, command)
コード例 #7
0
ファイル: udev.py プロジェクト: fabiand/blivet
def udev_settle():
    # wait maximal 300 seconds for udev to be done running blkid, lvm,
    # mdadm etc. This large timeout is needed when running on machines with
    # lots of disks, or with slow disks
    util.run_program(["udevadm", "settle", "--timeout=300"])