[XEND] Fix xen_version and missing os import

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2006-11-03 16:51:28 +00:00
1 parent 2791eeb645
commit 14267ebb9a
2 files changed
+8 -3

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ import time
import threading
import re
import copy
import os
from types import StringTypes
import xen.lowlevel.xc
+7 -3
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.