1
0
Fork 0

pickle_provider: consts moved to consts.py

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2013-02-19 17:46:47 +01:00
parent d5017be612
commit 9feb8b728a
2 changed files with 3 additions and 3 deletions

View file

@ -5,6 +5,7 @@ DBUS_BUS = "com.redhat.tuned"
DBUS_INTERFACE = "com.redhat.tuned.control"
DBUS_OBJECT = "/Tuned"
DEFAULT_PROFILE = "balanced"
DEFAULT_STORAGE_FILE = "/run/tuned/save.pickle"
LOAD_DIRECTORIES = ["/usr/lib/tuned", "/etc/tuned"]
# number of backups
LOG_FILE_COUNT = 2

View file

@ -2,17 +2,16 @@ import interfaces
import tuned.logs
import pickle
import os
import tuned.consts as consts
log = tuned.logs.get()
DEFAULT_STORAGE_FILE = "/run/tuned/save.pickle"
class PickleProvider(interfaces.Provider):
__slots__ = ["_path", "_data"]
def __init__(self, path=None):
if path is None:
path = DEFAULT_STORAGE_FILE
path = consts.DEFAULT_STORAGE_FILE
self._path = path
self._data = {}