[PATCH] virtinst: create scratchdir if it doesn't exisst

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

 



Hi,
subject basically says it all. Please apply if you see fit.
 -- Guido
# HG changeset patch
# User Guido Guenther <agx@xxxxxxxxxxx>
# Date 1222081640 -7200
# Node ID 1c780d8897653af0f13008954e7ecff9f8fdd724
# Parent  96686d6e460a7763ef431362f45a0a28e66edf22
create scratchdir if it doesn't exist

diff -r 96686d6e460a -r 1c780d889765 virtinst/ImageFetcher.py
--- a/virtinst/ImageFetcher.py	Mon Sep 22 13:07:04 2008 +0200
+++ b/virtinst/ImageFetcher.py	Mon Sep 22 13:07:20 2008 +0200
@@ -40,6 +40,8 @@
         self.scratchdir = scratchdir
 
     def saveTemp(self, fileobj, prefix):
+        if not os.path.exists(self.scratchdir):
+            os.makedirs(self.scratchdir, 0750)
         (fd, fn) = tempfile.mkstemp(prefix="virtinst-" + prefix, dir=self.scratchdir)
         block_size = 16384
         try:
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

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

  Powered by Linux