yum-presto 0.3.4

Tim Lauridsen tla at rasmil.dk
Thu Apr 5 12:53:15 UTC 2007


Valent Turkovic wrote:
> Can you tell me if yum-presto is intended to work on Fedora 7 test 3?
> I installed yum-presto-0.3.6 on Fedora 7 test 3 and when running 'yum
> update' I get this:
>
> # yum update
> Loading "installonlyn" plugin
> Traceback (most recent call last):
>  File "/usr/bin/yum", line 29, in <module>
>    yummain.main(sys.argv[1:])
>  File "/usr/share/yum-cli/yummain.py", line 82, in main
>    base.getOptionsConfig(args)
>  File "/usr/share/yum-cli/cli.py", line 142, in getOptionsConfig
>    errorlevel=opts.errorlevel)
>  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 145,
> in _getConfig
>    startupconf.pluginconfpath)
>  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 271,
> in doPluginSetup
>    plugin_types, confpath)
>  File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 129, in 
> __init__
>    self._importplugins(types)
>  File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 170, in
> _importplugins
>    self._loadplugin(modulefile, types)
>  File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 187, in
> _loadplugin
>    module = imp.load_module(modname, fp, pathname, description)
>  File "/usr/lib/yum-plugins/presto.py", line 31, in <module>
>    from prestomdparser import PrestoMDParser
>  File "/usr/share/presto/prestomdparser.py", line 22, in <module>
>    from cElementTree import iterparse
> ImportError: No module named cElementTree
>
This error is Python 2.5 related, cElementTree is included in Python 2.5.

Something like this will make it work in both python 2.4 (FC6) and 
Python 2.5 (FC7)

try:
    from cElementTree import interparse # Python 2.4
except:
    from xml.etree.cElementTree  import interparse # Python 2.5

Tim




More information about the fedora-devel-list mailing list