[Pkg-libvirt-maintainers] Bug#493758: Poor virt-image errors with faulty XML file

Filip Van Raemdonck mechanix at debian.org
Mon Aug 4 18:42:50 UTC 2008


Package: virtinst
Version: 0.300.3-4
Severity: minor

When specifying a file that isn't actually an XML file, virt-image spits
out an unfriendly python backtrace instead of a proper error message:

$ virt-image -d -p /dev/null
ma, 04 aug 2008 20:15:12 ERROR    xmlReadMemory() failed
Traceback (most recent call last):
  File "/usr/bin/virt-image", line 242, in <module>
    main()
  File "/usr/bin/virt-image", line 173, in main
    image = parse_image_xml(options.image)
  File "/usr/bin/virt-image", line 162, in parse_image_xml
    return virtinst.ImageParser.parse(xml, os.path.dirname(fname))
  File "/var/lib/python-support/python2.5/virtinst/ImageParser.py", line 232, in parse
    raise ParserException("%s\n%s" % (e, error.msg))
ParserException: xmlReadMemory() failed
$ virt-image -d -p /etc/issue
ma, 04 aug 2008 20:34:07 ERROR    xmlReadMemory() failed
Entity: line 1: parser error : Start tag expected, '<' not found
Debian GNU/Linux lenny/sid \n \l
^
Traceback (most recent call last):
  File "/usr/bin/virt-image", line 242, in <module>
    main()
  File "/usr/bin/virt-image", line 173, in main
    image = parse_image_xml(options.image)
  File "/usr/bin/virt-image", line 162, in parse_image_xml
    return virtinst.ImageParser.parse(xml, os.path.dirname(fname))
  File "/var/lib/python-support/python2.5/virtinst/ImageParser.py", line 232, in parse
    raise ParserException("%s\n%s" % (e, error.msg))
ParserException: xmlReadMemory() failed
Entity: line 1: parser error : Start tag expected, '<' not found
Debian GNU/Linux lenny/sid \n \l
^


KR,

Filip

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'stable'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=nl_BE.UTF-8, LC_CTYPE=nl_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages virtinst depends on:
ii  python                     2.5.2-1       An interactive high-level object-o
ii  python-libvirt             0.4.4-3       libvirt Python bindings
ii  python-libxml2             2.6.32.dfsg-2 Python bindings for the GNOME XML 
ii  python-support             0.8.4         automated rebuilding support for P
ii  python-urlgrabber          3.1.0-4       A high-level cross-protocol url-gr

Versions of packages virtinst recommends:
pn  virt-viewer                   <none>     (no description available)

-- no debconf information





More information about the Pkg-libvirt-maintainers mailing list