WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix TypeError when calling get_last_updated api call

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix TypeError when calling get_last_updated api call
From: Ruben Kerkhof <ruben@xxxxxxxxxxxxxxxx>
Date: Sat, 8 Aug 2009 14:59:18 +0200
Delivery-date: Sat, 08 Aug 2009 05:59:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ruben Kerkhof <ruben@xxxxxxxx>
# Date 1249736218 -7200
# Node ID 7bc1e6403b776b4040560525e986960c283d8b73
# Parent  b9cdcf502aa35818581d41cee7e6e30ae49acb92
Fix TypeError when calling get_last_updated api call

get_last_updated returns a DateTime and cannot be compared to _RECONNECT_AND_RETRY

diff --git a/tools/python/xen/xm/XenAPI.py b/tools/python/xen/xm/ XenAPI.py
--- a/tools/python/xen/xm/XenAPI.py
+++ b/tools/python/xen/xm/XenAPI.py
@@ -140,7 +140,7 @@ class Session(xmlrpcclient.ServerProxy):
             while retry_count < 3:
                 full_params = (self._session,) + params
result = _parse_result(getattr(self, methodname) (*full_params))
-                if result == _RECONNECT_AND_RETRY:
+                if str(result) == _RECONNECT_AND_RETRY:
                     retry_count += 1
                     if self.last_login_method:
                         self._login(self.last_login_method,


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix TypeError when calling get_last_updated api call, Ruben Kerkhof <=