Ticket #582 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

client using elementree and not lxml suffers from encoding error

Reported by: Jim Rowan <[email protected]…> Owned by: desai
Priority: minor Milestone: Bcfg2 0.9.6 Release
Component: bcfg2-client Version:
Keywords: Cc:

Description (last modified by desai) (diff)

client: ubuntu 8.04; python 2.5.2

ubuntu-client# bcfg2 -v -d {'profile': False, 'interactive': False, 'dryrun': False, 'verbose': True, 'extra': False, 'args': [], 'server': '', 'agent': False, 'key': '/etc/bcfg2.key', 'debug': True, 'bundle': [], 'file': False, 'fingerprint': [], 'password': '4x4J1', 'help': False, 'agent-background': False, 'kevlar': False, 'omit-lock-check': False, 'paranoid': False, 'drivers': ['Action', 'APT', 'Blast', 'Chkconfig', 'DebInit?', 'Encap', 'FreeBSDInit', 'FreeBSDPackage', 'launchd', 'Portage', 'POSIX', 'RPMng', 'RcUpdate?', 'SMF', 'SYSV', 'YUMng'], 'cache': False, 'remove': False, 'retries': '3', 'encoding': 'ascii', 'decision-list': False, 'build': False, 'quick': False, 'agent-port': '6789', 'setup': '/etc/bcfg2.conf', 'user': 'ubuntu-client-uuid'} no server x509 fingerprint; no server verification performed! Running probe arch Probe arch has result: group:i686 Failed to upload probe data Traceback (most recent call last):

File "/usr/bin/bcfg2", line 251, in run

proxy.RecvProbeData?(Bcfg2.Client.XML.tostring(probedata, encoding='UTF-8', xml_declaration=True))

TypeError?: tostring() got an unexpected keyword argument 'xml_declaration'


Installing lxml made this go away.


Change History

comment:1 Changed 15 years ago by [email protected]

It seem like the python 2.5 etree stuff is missing some feature from it's lxml parent.

We would need to make a wrapper function for tostring to be able to eat xml_declaration and totally ignore it. I for see also the same problem with the pretty_print for commit [011d38cd29880942c7049edd95078c41761c49cb] (SVN r4828)

comment:2 Changed 15 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)
  • Milestone set to Bcfg2 0.9.6 Release

This is fixed in [f65abe0247b7c23dee8bb0b0b317b55feb8123be] (SVN r4834).

Actually, it is the other way around. lxml is descended from elementtree, but elementtree doesn't support a lot of stuff that lxml does. The only place that we need to be able to run without lxml is on the client side (to reduce our prereq footprint)

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.