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 12-13-2007, 01:24 AM
David Lutterkort
 
Default Move abspath to ImageParser.Image

# HG changeset patch
# User David Lutterkort <dlutter@redhat.com>
# Date 1197512462 28800
# Node ID 2f713d54e92e7699c43ac828ab4bab326275edd2
# Parent 557938724328c5b26e222f4a79d2e36b3a1e5d80
Move abspath to ImageParser.Image

diff -r 557938724328 -r 2f713d54e92e virtinst/ImageManager.py
--- a/virtinst/ImageManager.py Wed Dec 12 18:21:02 2007 -0800
+++ b/virtinst/ImageManager.py Wed Dec 12 18:21:02 2007 -0800
@@ -128,7 +128,7 @@ class ImageInstaller(Guest.Installer):
return True

def _abspath(self, p):
- return os.path.abspath(os.path.join(self.image.base, p))
+ return self.image.abspath(p)

class PlatformMatchException(Exception):
def __init__(self, msg):
diff -r 557938724328 -r 2f713d54e92e virtinst/ImageParser.py
--- a/virtinst/ImageParser.py Wed Dec 12 18:21:02 2007 -0800
+++ b/virtinst/ImageParser.py Wed Dec 12 18:21:02 2007 -0800
@@ -19,6 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.

+import os.path
import libxml2
import CapabilitiesParser
from virtinst import _virtinst as _
@@ -40,6 +41,11 @@ class Image:
self.release = None
if not node is None:
self.parseXML(node)
+
+ def abspath(self, p):
+ """Turn P into an absolute path. Relative paths are taken relative
+ to self.BASE"""
+ return os.path.abspath(os.path.join(self.base, p))

def parseXML(self, node):
self.name = xpathString(node, "name")

_______________________________________________
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 08:24 AM.

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