def _create_non_solr_cloud_index(self, name, fields, unique_key_field, df):
    # Create instance directory locally.
    instancedir = os.path.join(CORE_INSTANCE_DIR.get(), name)

    if os.path.exists(instancedir):
      raise PopupException(instancedir % _("Instance directory %s already exists! Please remove it from the file system."))

    try:
      tmp_path, solr_config_path = copy_configs(fields, unique_key_field, df, False)
      try:
        shutil.move(solr_config_path, instancedir)
      finally:
        shutil.rmtree(tmp_path)

      if not self.api.create_core(name, instancedir):
        raise Exception('Failed to create core: %s' % name)
    except Exception, e:
      raise PopupException(_('Could not create index. Check error logs for more info.'), detail=e)
    finally:
      # Delete instance directory if we couldn't create the core.
      shutil.rmtree(instancedir)
#
dataset/ETHPy150Open cloudera/hue/desktop/libs/indexer/src/indexer/controller2.py/IndexController._create_non_solr_cloud_index/swapped operands of `%`