On Mon, Jan 14, 2008 at 11:59:54AM +0100, Tim Lauridsen wrote:
> Look like there is a problem with pup/pirut and the aliases plugin.
>
> https://www.redhat.com/archives/fedora-test-list/2008-January/msg00154.html
>
> I have answered the user to open a bz report the problem.
>
> The problem is the
> from i18n import _
>
> this only works when running from the cli, bacause i18n.py is located in
> /usr/share/yum-cli and nor available without adding '/usr/share/yum-cli'
> the python path.
> yumex works because it have a i18n.py providing the same function.
>
> a quick workaround could be adding:
>
> try:
> from i18n import _
> except ImportError:
> def _(msg):
> print msg
small comment...
I think this is a better definition:
def _(m): return m
Another solution to this as well from the yum side would be to add a
try/except around the __import__ and skip loading bad modules with a
logged error rather than just quitting.
--
Michael
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel