From 96b2d6ec42c84e38f5e15523a093f71bba3300c8 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 17 Feb 2009 12:54:16 +0000 Subject: [PATCH] a hack for pisi to work with non-patched Python --- pisi/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pisi/__init__.py b/pisi/__init__.py index 3f26f94b..31634d8b 100644 --- a/pisi/__init__.py +++ b/pisi/__init__.py @@ -13,6 +13,7 @@ # PiSi version import os +import sys import atexit import logging @@ -67,6 +68,11 @@ def _cleanup(): ctx.ui.close() ctx.enable_keyboard_interrupts() +# Hack for pisi to work with non-patched Python. pisi needs +# lots of work for not doing this. +reload(sys) +sys.setdefaultencoding('utf-8') + atexit.register(_cleanup) ctx.config = pisi.config.Config(pisi.config.Options())