From: Kaleb Pederson Subject: python bindings: xen.lowlevel.xc.error Date: Thu, 18 May 2006 12:31:53 -0700 Message-ID: <20060518193153.GB24931@kibab> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hello, I don't see any way to get at the exception class that is being used by xen.lowlevel.xc. I wanted to be able to grab just the xen exceptions, but it doesn't appear possible: >>> import xen.lowlevel.xc as xc >>> dir(xc) ['__doc__', '__file__', '__name__', 'xc'] # the only thing listed is the xc class # i'm running 3.0.2 using the sedf scheduler, so this should fail >>> try: ... x.bvtsched_domain_get(0) ... except Exception, e: ... print e.__class__ ... print dir(e) ... print dir(e.__class__) ... print e.__module__ ... print e.args ... xen.lowlevel.xc.error ['__doc__', '__getitem__', '__init__', '__module__', '__str__', 'args'] ['__doc__', '__getitem__', '__init__', '__module__', '__str__'] xen.lowlevel.xc (22, 'Invalid argument') >>> e >>> xc.error Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'error' Did I miss something? If not, could the xen.lowlevel.xc.error class be publically exposed? Thanks. --Kaleb