from configobj import ConfigObj, ConfigObjError
if (os.geteuid() == 0 and platform.machine() in ["i386", "i486", "i586", "i686", "x86_64"]):
import tuned.consts as consts
from tuned.utils.commands import commands
class ProfileRecommender:
self._commands = commands()
def recommend(self, hardcoded = False):
profile = consts.DEFAULT_PROFILE
has_root = os.geteuid() == 0
log.warning("Profile recommender is running without root privileges. Profiles with virt recommendation condition will be omitted.")
matching = self.process_config(consts.RECOMMEND_CONF_FILE,