a hack for pisi to work with non-patched Python
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
# PiSi version
|
# PiSi version
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import atexit
|
import atexit
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@@ -67,6 +68,11 @@ def _cleanup():
|
|||||||
ctx.ui.close()
|
ctx.ui.close()
|
||||||
ctx.enable_keyboard_interrupts()
|
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)
|
atexit.register(_cleanup)
|
||||||
|
|
||||||
ctx.config = pisi.config.Config(pisi.config.Options())
|
ctx.config = pisi.config.Config(pisi.config.Options())
|
||||||
|
|||||||
Reference in New Issue
Block a user