From da0cb12b80541df7b5da795fd5ec057a3c13f7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Dunand?= Date: Fri, 31 May 2013 16:58:50 +0200 Subject: [PATCH] Keep arrow level in scripts Since we use a global variable in installsystems.printer to store the arrow level, we have to keep this module in scripts global context. --- installsystems/image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installsystems/image.py b/installsystems/image.py index d7f3ddb..7fef9b2 100644 --- a/installsystems/image.py +++ b/installsystems/image.py @@ -223,6 +223,8 @@ class Image(object): # sys must be in sys.module to allow loading of modules sysmodules["sys"] = sys sysmodules.update(self.modules) + # we need installsystems.printer to conserve arrow level + sysmodules["installsystems.printer"] = installsystems.printer exec bytecode in global_dict except Exception as e: raise ISError(u"Unable to execute script %s" % path, e) -- GitLab