[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] merge?
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID b55a43d39a409074b956e86ebffd39376b839659 # Parent 8204a2d6cd55efb792d3a3e9c18e99c20a37622e # Parent ea373837d474bf2a050b2924c237025ad0f7b9c9 merge? diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/web/SrvBase.py --- a/tools/python/xen/web/SrvBase.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/web/SrvBase.py Wed Sep 28 13:08:52 2005 @@ -81,7 +81,14 @@ req.write("Operation not implemented: " + op) return '' else: - return op_method(op, req) + try: + res = op_method(op, req) + except Exception, exn: + log.exception("Request %s failed.", op) + if req.useSxp(): + return ['xend.err', "Exception: " + str(exn)] + else: + return "<p>%s</p>" % str(exn) def print_path(self, req): """Print the path with hyperlinks. diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/xend/XendDomain.py --- a/tools/python/xen/xend/XendDomain.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/xend/XendDomain.py Wed Sep 28 13:08:52 2005 @@ -547,6 +547,7 @@ except XendError: raise except Exception, exn: + log.exception("") raise XendError(str(exn)) diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Sep 28 13:08:52 2005 @@ -615,7 +615,7 @@ if not reason in shutdown_reasons.values(): raise XendError('invalid reason:' + reason) self.storeVm("control/shutdown", reason) - if not reason in ['suspend']: + if not reason == 'suspend': self.storeVm('xend/shutdown_start_time', time.time()) diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/xend/server/SrvDomainDir.py --- a/tools/python/xen/xend/server/SrvDomainDir.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/xend/server/SrvDomainDir.py Wed Sep 28 13:08:52 2005 @@ -152,11 +152,11 @@ domains = self.xd.list_sorted() req.write('<ul>') for d in domains: - req.write('<li><a href="%s%s"> Domain %s</a>' - % (url, d.getName(), d.getName())) - req.write('id=%s' % d.getDomain()) - req.write('memory=%d'% d.getMemoryTarget()) - req.write('ssidref=%d'% d.getSsidref()) + req.write( + '<li><a href="%s%s">Domain %s</a>: id = %s, memory = %d, ' + 'ssidref = %d.' + % (url, d.getName(), d.getName(), d.getDomid(), + d.getMemoryTarget(), d.getSsidref())) req.write('</li>') req.write('</ul>') diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/xend/server/SrvNode.py --- a/tools/python/xen/xend/server/SrvNode.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/xend/server/SrvNode.py Wed Sep 28 13:08:52 2005 @@ -62,7 +62,7 @@ for d in self.info(): req.write('<li> %10s: %s' % (d[0], str(d[1]))) req.write('<li><a href="%sdmesg">Xen dmesg output</a>' % url) - req.write('<li><a href="%slog>Xend log</a>' % url) + req.write('<li><a href="%slog">Xend log</a>' % url) req.write('</ul>') req.write('</body></html>') diff -r 8204a2d6cd55 -r b55a43d39a40 tools/python/xen/xend/xenstore/xstransact.py --- a/tools/python/xen/xend/xenstore/xstransact.py Wed Sep 28 13:07:57 2005 +++ b/tools/python/xen/xend/xenstore/xstransact.py Wed Sep 28 13:08:52 2005 @@ -42,8 +42,15 @@ '%s, while reading %s' % (ex.args[1], path)) def read(self, *args): - if len(args) == 0: - raise TypeError + """If no arguments are given, return the value at this transaction's + path. If one argument is given, treat that argument as a subpath to + this transaction's path, and return the value at that path. + Otherwise, treat each argument as a subpath to this transaction's + path, and return a list composed of the values at each of those + instead. + """ + if len(args) == 0: + return xshandle().read(self.path) if len(args) == 1: return self._read(args[0]) ret = [] @@ -191,6 +198,13 @@ def Read(cls, path, *args): + """If only one argument is given (path), return the value stored at + that path. If two arguments are given, treat the second argument as a + subpath within the first, and return the value at the composed path. + Otherwise, treat each argument after the first as a subpath to the + given path, and return a list composed of the values at each of those + instead. This operation is performed inside a transaction. + """ while True: t = cls(path) try: @@ -234,6 +248,12 @@ Remove = classmethod(Remove) def List(cls, path, *args): + """If no arguments are given (path), list its contents, returning the + entries therein, or None if no entries are found. Otherwise, treat + each further argument as a subpath to the given path, and return the + cumulative listing of each of those instead. This operation is + performed inside a transaction. + """ while True: t = cls(path) try: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |