Re: [libvirt-test-API][PATCH] fix the problem of return None value of self.conn

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

 



于 2011年08月16日 15:18, Wayne Sun 写道:
---
  lib/connectAPI.py |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/connectAPI.py b/lib/connectAPI.py
index 702a088..cfa4fea 100644
--- a/lib/connectAPI.py
+++ b/lib/connectAPI.py
@@ -44,7 +44,7 @@ class ConnectAPI(object):

      def open(self, uri):
          try:
-            conn = libvirt.open(uri)
+            self.conn = libvirt.open(uri)
              return self.conn
          except libvirt.libvirtError, e:
              message = e.get_error_message()
@@ -53,7 +53,7 @@ class ConnectAPI(object):

      def open_read_only(self, uri):
          try:
-            conn = libvirt.openReadOnly(uri)
+            self.conn = libvirt.openReadOnly(uri)
              return self.conn
          except libvirt.libvirtError, e:
              message = e.get_error_message()
@@ -62,7 +62,7 @@ class ConnectAPI(object):

      def openAuth(self, uri, auth, flags = 0):
          try:
-            conn = libvirt.openAuth(uri, auth, flags)
+            self.conn = libvirt.openAuth(uri, auth, flags)
              return self.conn
          except libvirt.libvirtError, e:
              message = e.get_error_message()

ACK

Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]