def _get_hostname():
    """
    Will fetch current hostname of VM if any and return.
    Looks at /etc/hostname config for Generic config server.
    """
    try:
        with open("/etc/hostname") as fyl:
            _hostname = fyl.read().strip()
            if _hostname != "":
                return _hostname
        return None

    except Exception, e:
        logging.info(str(e) % "Current hostname enquiry failed: %s")
        return None
dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/commands/network.py/_get_hostname/swapped operands of `%`