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-changelog

[Xen-changelog] [xen-unstable] Send INTERNAL_ERROR rather than ERROR_TOD

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Send INTERNAL_ERROR rather than ERROR_TODO if device creation fails.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 05 Apr 2007 06:50:16 -0700
Delivery-date: Thu, 05 Apr 2007 06:50:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1175694832 -3600
# Node ID 610dcfb3c1641c7f62bf546aa4eea781aaa7999c
# Parent  e5931b5e6cc5202a9c86c3cd717580bead18c657
Send INTERNAL_ERROR rather than ERROR_TODO if device creation fails.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r e5931b5e6cc5 -r 610dcfb3c164 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Wed Apr 04 14:49:38 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py  Wed Apr 04 14:53:52 2007 +0100
@@ -2079,8 +2079,8 @@ class XendAPI(object):
             vif_ref = dom.create_vif(vif_struct)
             xendom.managed_config_save(dom)
             return xen_api_success(vif_ref)
-        except XendError:
-            return xen_api_error(XEND_ERROR_TODO)
+        except XendError, exn:
+            return xen_api_error(['INTERNAL_ERROR', str(exn)])
           
     def VIF_destroy(self, session, vif_ref):
         xendom = XendDomain.instance()
@@ -2367,8 +2367,8 @@ class XendAPI(object):
                 vtpm_ref = dom.create_vtpm(vtpm_struct)
                 xendom.managed_config_save(dom)
                 return xen_api_success(vtpm_ref)
-            except XendError:
-                return xen_api_error(XEND_ERROR_TODO)
+            except XendError, exn:
+                return xen_api_error(['INTERNAL_ERROR', str(exn)])
         else:
             return xen_api_error(['HANDLE_INVALID', 'VM', vtpm_struct['VM']])
 
@@ -2442,8 +2442,8 @@ class XendAPI(object):
             console_ref = dom.create_console(console_struct)
             xendom.managed_config_save(dom)
             return xen_api_success(console_ref)
-        except XendError, e:
-            return xen_api_error([XEND_ERROR_TODO, str(e)])
+        except XendError, exn:
+            return xen_api_error(['INTERNAL_ERROR', str(exn)])
 
     # Xen API: Class SR
     # ----------------------------------------------------------------

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Send INTERNAL_ERROR rather than ERROR_TODO if device creation fails., Xen patchbot-unstable <=