ia64/xen-unstable

view tools/xm-test/lib/XmTestReport/utils.py @ 12765:43671a60b0f1

Merge
author Alastair Tse <atse@xensource.com>
date Fri Dec 01 18:33:11 2006 +0000 (2006-12-01)
parents 139aabe357a4
children
line source
1 #!/usr/bin/python
3 """
4 utils.py - Utilities for reporting xm-test results
6 Copyright (C) International Business Machines Corp., 2005
7 Author: Dan Smith <danms@us.ibm.com>
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; under version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 """
24 from xml.sax.saxutils import escape
26 def tagify(tag, string):
27 return "<%s>%s</%s>" % (tag, escape(string.strip()), tag)