code: def _normalize_basedir(basedir=None):
      '''
      Takes a basedir argument as a string or a list. If the string or list is
      empty, then look up the default from the 'reposdir' option in the yum
      config.
  
      Returns a list of directories.
      '''
      # if we are passed a string (for backward compatibility), convert to a list
      if isinstance(basedir, six.string_types):
          basedir = [x.strip() for x in basedir.split(',')]
  
      if basedir is None:
          basedir = []
  
      # nothing specified, so use the reposdir option as the default
      if not basedir:
          basedir = _get_yum_config_value('reposdir')
  
      if not isinstance(basedir, list) or not basedir:
          raise SaltInvocationError('Could not determine any repo directories')
  
      return basedif _normalize_basedir(basedir=None):
      '''
      Takes a basedir argument as a string or a list. If the string or list is
      empty, then look up the default from the 'reposdir' option in the yum
      config.
  
      Returns a list of directories.
      '''
      # if we are passed a string (for backward compatibility), convert to a list
      if isinstance(basedir, six.string_types):
          basedir = [x.strip() for x in basedir.split(',')]
  
      if basedir is None:
          basedir = []
  
      # nothing specified, so use the reposdir option as the default
      if not basedir:
          basedir = _get_yum_config_value('reposdir')
  
      if not isinstance(basedir, list) or not basedir:
          raise SaltInvocationError('Could not determine any repo directories')
  
      return basedir
docs: Takes a basedir argument as a string or a list. If the string or list is
      empty, then look up the default from the 'reposdir' option in the yum
      config.
  
      Returns a list of directories.