import logging


def parse_du_command(capacity, bytes_multiplier=1024):
    """
    Parse the result from running `du -sb` in a container.
    """
    try:
        return float(capacity.split()[0]) * bytes_multiplier
    except (KeyError, ValueError) as e:
        logging.warning(f"Could not parse du command because: {e}")
    return None