Re: [PATCH 1/4] Make parent directories for ks scriptlet log files (#597279)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2 Jun 2010, Chris Lumens wrote:

diff --git a/iutil.py b/iutil.py
index a568ff7..d0f6212 100644
--- a/iutil.py
+++ b/iutil.py
@@ -93,6 +93,9 @@ def execWithRedirect(command, argv, stdin = None, stdout = None,
         stdin = sys.stdin.fileno()

     if isinstance(stdout, str):
+        dn = os.path.dirname(os.path.realpath(stdout))
+        if not os.path.isdir(dn):
+            os.makedirs(dn)
         stdout = os.open(stdout, os.O_RDWR|os.O_CREAT)
         stdoutclose = lambda : os.close(stdout)
     elif isinstance(stdout, int):

I intended to fix this with s/basename/dirname on line 85 of
kickstart.py on master.  When I was working on this feature, I spaced
out and used basename instead of dirname on that line.  You got to the
bug first, but I think that's what should be done.


Yeah, that makes more sense.  Done.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux