def _assert_snapshot_type(self, external=False):
        # If domain has snapshots we must check their type

        # TODO(ddmitriev)
        snap_list = self.get_snapshots()

        if 0 > len(snap_list):
            snap_type = snap_list[0].get_type
            if external and snap_type == 'internal':
                raise DevopsError(
                    "Cannot create external snapshot when internal exists")
            if not external and snap_type == 'external':
                raise DevopsError(
                    "Cannot create internal snapshot when external exists")

    # EXTERNAL SNAPSHOT
dataset/ETHPy150Open openstack/fuel-devops/devops/driver/libvirt/libvirt_driver.py/LibvirtNode._assert_snapshot_type/swapped operands of `>`