FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 03:11 PM
Mark McLoughlin
 
Default Remove temporary treeinfo files from /var/tmp

# HG changeset patch
# User Mark McLoughlin <markmc@redhat.com>
# Date 1208962770 -3600
# Node ID c7e565fa0b688738b9c077c4349e427501c31811
# Parent c54605ffcd7b4356b2c02c85bb2c4413eae6fa53
Remove temporary treeinfo files from /var/tmp

Signed-off-by: Mark McLoughlin <markmc@redhat.com>

diff -r c54605ffcd7b -r c7e565fa0b68 virtinst/OSDistro.py
--- a/virtinst/OSDistro.py Mon Apr 21 18:07:25 2008 -0400
+++ b/virtinst/OSDistro.py Wed Apr 23 15:59:30 2008 +0100
@@ -56,17 +56,22 @@ class RedHatDistro(Distro):

def hasTreeinfo(self, fetcher, progresscb):
# all Red Hat based distros should have .treeinfo / execute only once
- if (self.treeinfo is None):
- if fetcher.hasFile(".treeinfo"):
- logging.debug("Detected .treeinfo file")
- tmptreeinfo = fetcher.acquireFile(".treeinfo", progresscb)
- self.treeinfo = ConfigParser.SafeConfigParser()
- self.treeinfo.read(tmptreeinfo)
- return True
- else:
- return False
- else:
+ if not (self.treeinfo is None):
return True
+
+ if not fetcher.hasFile(".treeinfo"):
+ return False
+
+ logging.debug("Detected .treeinfo file")
+
+ tmptreeinfo = fetcher.acquireFile(".treeinfo", progresscb)
+ try:
+ self.treeinfo = ConfigParser.SafeConfigParser()
+ self.treeinfo.read(tmptreeinfo)
+ finally:
+ os.unlink(tmptreeinfo)
+
+ return True

def acquireKernel(self, fetcher, progresscb):
if self.hasTreeinfo(fetcher, progresscb):

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-24-2008, 02:59 AM
"Daniel P. Berrange"
 
Default Remove temporary treeinfo files from /var/tmp

On Wed, Apr 23, 2008 at 04:11:43PM +0100, Mark McLoughlin wrote:
> # HG changeset patch
> # User Mark McLoughlin <markmc@redhat.com>
> # Date 1208962770 -3600
> # Node ID c7e565fa0b688738b9c077c4349e427501c31811
> # Parent c54605ffcd7b4356b2c02c85bb2c4413eae6fa53
> Remove temporary treeinfo files from /var/tmp

Thanks I have applied this.

Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 04:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org