a hack for pisi to work with non-patched Python
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user