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] [XEND] Fix xen_version and missing os imp

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix xen_version and missing os import
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Nov 2006 16:50:29 +0000
Delivery-date: Mon, 06 Nov 2006 08:52:58 -0800
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 Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 13ea4bea823764599c05a1dea2b7441e0f63456d
# Parent  3a0116aa7ff56573342078e8123bd7398b61755b
[XEND] Fix xen_version and missing os import

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    1 +
 tools/python/xen/xend/XendNode.py       |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff -r 3a0116aa7ff5 -r 13ea4bea8237 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 03 15:47:05 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 03 16:51:28 2006 +0000
@@ -29,6 +29,7 @@ import threading
 import threading
 import re
 import copy
+import os
 from types import StringTypes
 
 import xen.lowlevel.xc
diff -r 3a0116aa7ff5 -r 13ea4bea8237 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Fri Nov 03 15:47:05 2006 +0000
+++ b/tools/python/xen/xend/XendNode.py Fri Nov 03 16:51:28 2006 +0000
@@ -80,9 +80,13 @@ class XendNode:
 
     def xen_version(self):
         info = self.xc.xeninfo()
-        from xen import VERSION
-        return {'Xen': '%(xen_major)d.%(xen_minor)d' % info,
-                'Xend': VERSION}
+        try:
+            from xen import VERSION
+            return {'Xen': '%(xen_major)d.%(xen_minor)d' % info,
+                    'Xend': VERSION}
+        except (ImportError, AttributeError):
+            return {'Xen': '%(xen_major)d.%(xen_minor)d' % info,
+                    'Xend': '3.0.3'}
 
     def get_name(self):
         return self.name

_______________________________________________
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] [XEND] Fix xen_version and missing os import, Xen patchbot-unstable <=