]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blobdiff - scripts/phase.py
Chnage conf paths from absolute to relative
[linux-conf-perf.git] / scripts / phase.py
index fe7b4b1793b1bb8f50da562e3c71fcbff9f3d63b..390087fd602166d02b20d9a0086ffa8009d71e21 100644 (file)
@@ -2,6 +2,7 @@ import os
 import sys
 
 from conf import conf
+from conf import sf
 
 phases = ("Not Initialized",           #0
                  "Initializing",                       #1
@@ -18,7 +19,7 @@ phases = ("Not Initialized",          #0
 
 def get():
        try:
-               with open(conf.phase_file) as f:
+               with open(sf(conf.phase_file)) as f:
                        txtPhase = f.readline().rstrip()
                if not txtPhase in phases:
                        raise PhaseMismatch()
@@ -27,7 +28,7 @@ def get():
                return 0
        
 def set(phs):
-       with open(conf.phase_file, 'w') as f:
+       with open(sf(conf.phase_file), 'w') as f:
                f.write(phases[phs])
 
 def pset(str):