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

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



On 08/16/2011 03:18 PM, Wayne Sun wrote:
---
  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()
      Yep, it is a regression caused by commit c61fa9f
       ACK and pushed.


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