Hi, Am Dienstag, 12. April 2011, 14:23:51 schrieb Jan Pazdziora: > On Tue, Apr 12, 2011 at 12:41:01PM +0200, Michael Calmer wrote: > > Hi, > > > > cElementTree_iterparse in yum.misc is only available in new versions of > > yum. > > Attached you can find a patch which uses the old style, used in older > > versions of yum. > > In the end, I opted for approach with either does > cElementTree_iterparse or cElementTree.
Hmm, I wrote a little test script with your version and it did not work either. May it be that "import cElementTree" is only available on very old systems? I fear we need all three tests. Something like this? try: from yum.misc import cElementTree_iterparse as iterparse except ImportError: try: from xml.etree import cElementTree except ImportError: import cElementTree iterparse = cElementTree.iterparse -- MFG Michael Calmer -------------------------------------------------------------------------- Michael Calmer SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg T: +49 (0) 911 74053 0 F: +49 (0) 911 74053575 - e-mail: michael.cal...@suse.com -------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel