INNER CODE UNIT · Python

split_nodes

LINBIT/linstor-server · scripts/linstor-controller-ha-setup.py:120

def split_nodes(value):
    """--nodes as an ordered, de-duplicated list."""
    names = []
    for name in value.split(","):
        name = name.strip()
        if name and name not in names:
            names.append(name)
    return names


def _run(cmd, check=False, capture=False):
    """subprocess.run for Python 3.6 and up.

    RHEL 8 ships Python 3.6, where `capture_output` and `text` do not exist
    yet (both are 3.7). Their long-hand equivalents work everywhere, so this
    script sticks to those rather than requiring a newer interpreter on the
    node it is meant to fix.
    """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…