Browse Source

change when __tako_shell__ is set up

master
adam j hartz 2 years ago
parent
commit
c81ba732f2
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      takoshell/main.py
  2. 1
    0
      takoshell/shell.py

+ 1
- 1
takoshell/main.py View File

@@ -170,7 +170,7 @@ def premain(argv=None):
170 170
         shell_kwargs['completer'] = True
171 171
         shell_kwargs['login'] = True
172 172
     from takoshell import imphooks
173
-    shell = builtins.__tako_shell__ = Shell(**shell_kwargs)
173
+    shell = Shell(**shell_kwargs)
174 174
     env = builtins.__tako_env__
175 175
     takorc_context('config.tako', execer=shell.execer, initial=shell.ctx)
176 176
     env['TAKO_LOGIN'] = shell_kwargs['login']

+ 1
- 0
takoshell/shell.py View File

@@ -54,6 +54,7 @@ class Shell(object):
54 54
         self.login = kwargs.get('login', True)
55 55
         self.headless = headless
56 56
         self.kwargs = kwargs
57
+        builtins.__tako_shell__ = self
57 58
         self._init_environ(ctx,
58 59
                            kwargs.get('scriptcache', True),
59 60
                            kwargs.get('cacheall', False))

Loading…
Cancel
Save