• File: function_cpulist2devs.py
  • Full Path: /home/masbinta/public_html/admin/installer/css/sass/sym404/root/usr/lib/python3.6/site-packages/tuned/profiles/functions/function_cpulist2devs.py
  • File size: 460 bytes
  • MIME-type: text/x-python
  • Charset: utf-8
import tuned.logs
from . import base

log = tuned.logs.get()

class cpulist2devs(base.Function):
	"""
	Conversion function: converts CPU list to device strings
	"""
	def __init__(self):
		# arbitrary number of arguments
		super(cpulist2devs, self).__init__("cpulist2devs", 0)

	def execute(self, args):
		if not super(cpulist2devs, self).execute(args):
			return None
		return self._cmd.cpulist2string(self._cmd.cpulist_unpack(",".join(args)), prefix = "cpu")