[et-mgmt-tools] [PATCH] Allow Image Parser to be called without a file name. This is used to support using the object model directly

Bryan Kearney bkearney at redhat.com
Tue Nov 4 21:17:06 UTC 2008


# HG changeset patch
# User Bryan Kearney <bkearney at redhat.com>
# Date 1225833405 18000
# Node ID 92ad5a3f9c3ac47c96f7cb54f3e2632ebe3a037d
# Parent  352ef78f5a1fae402be672e80b1ab96c7408167e
Allow Image Parser to be called without a file name. This is used to support using the object model directly

diff -r 352ef78f5a1f -r 92ad5a3f9c3a virtinst/ImageParser.py
--- a/virtinst/ImageParser.py	Tue Nov 04 13:57:56 2008 -0500
+++ b/virtinst/ImageParser.py	Tue Nov 04 16:16:45 2008 -0500
@@ -35,7 +35,10 @@
     def __init__(self, node = None, base = None, filename = None):
         self.storage = {}
         self.domain = None
-        self.filename = os.path.abspath(filename)
+        if filename == None:
+            self.filename = None
+        else:
+            self.filename = os.path.abspath(filename)
         if base is None:
             if filename is not None:
                 self.base = os.path.dirname(filename)




More information about the et-mgmt-tools mailing list