@staticmethod
    def _sanitize_xenstore_key(key):
        """Xenstore only allows the following characters as keys:

        ABCDEFGHIJKLMNOPQRSTUVWXYZ
        abcdefghijklmnopqrstuvwxyz
        0123456789-/_@

        So convert the others to _

        Also convert / to _, because that is somewhat like a path
        separator.
        """
        allowed_chars = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                         "abcdefghijklmnopqrstuvwxyz"
                         "0123456789-_@")
        return ''.join([allowed_chars in x and x or '_' for x in key])
dataset/ETHPy150Open openstack/nova/nova/virt/xenapi/vmops.py/VMOps._sanitize_xenstore_key/swapped operands of `in`