[PATCH 2/4] Adapt to new way to get target root path
Vratislav Podzimek
vpodzime at redhat.com
Tue Jan 6 16:29:28 UTC 2015
The ROOT_PATH constant was replaced by the getSysroot() function because the
sysroot path may need to be set during the installation process.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
org_fedora_hello_world/ks/hello_world.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org_fedora_hello_world/ks/hello_world.py b/org_fedora_hello_world/ks/hello_world.py
index 0e004b3..4e582e1 100644
--- a/org_fedora_hello_world/ks/hello_world.py
+++ b/org_fedora_hello_world/ks/hello_world.py
@@ -23,7 +23,7 @@
import os.path
from pyanaconda.addons import AddonData
-from pyanaconda.constants import ROOT_PATH
+from pyanaconda.iutil import getSysroot
from pykickstart.options import KSOptionParser
from pykickstart.errors import KickstartParseError, formatErrorMsg
@@ -161,6 +161,6 @@ class HelloWorldData(AddonData):
"""
- hello_file_path = os.path.normpath(ROOT_PATH + HELLO_FILE_PATH)
+ hello_file_path = os.path.normpath(getSysroot() + HELLO_FILE_PATH)
with open(hello_file_path, "w") as fobj:
fobj.write("%s\n" % self.text)
--
2.1.0
More information about the anaconda-patches
mailing list