diff --git a/pisi/api.py b/pisi/api.py index 8491496e..9ef18df6 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -92,9 +92,9 @@ def install(packages): #FIXME: As Gurer warns, something's fishy with this exception proc. except InstallError, e: - print type(e) - ctx.ui.error(str(e)) - ctx.ui.error("InstallError:") #%s" % str(e)) + # FIXME: This is a workaround for __str__ conversion used in + # Python exceptions + ctx.ui.error(e.args[0]) except packagedb.Error, e: ctx.ui.error("PackageDBError: (%s)" % str(e)) diff --git a/pisi/cli/__init__.py b/pisi/cli/__init__.py index 1c95bf97..61eff490 100644 --- a/pisi/cli/__init__.py +++ b/pisi/cli/__init__.py @@ -92,9 +92,9 @@ class CLI(UI): while True: prompt = msg + colorize(_('(yes/no)'), 'red') s = raw_input(prompt.encode('utf-8')) - if s.startswith(_('y').encode('utf-8')) or s.startswith(_('Y').encode('utf-8')): + if s[0] in locale.nl_langinfo(locale.YESEXPR): return True - if s.startswith(_('n').encode('utf-8')) or s.startswith(_('N').encode('utf-8')): + elif s[0] in locale.nl_langinfo(locale.NOEXPR): return False def display_progress(self, pd):