1. hacklab
  2. moin-2.0

Commits

Fabio Montefuscolo  committed ec644b4

fix missing import and error in invoking 'moin shell'

  • Participants
  • Parent commits 16cf4b6
  • Branches default

Comments (0)

Files changed (1)

File MoinMoin/script/maint/moinshell.py

View file
  • Ignore whitespace
 # -*- coding: utf-8 -*-
 
+import code
+
 from flask import Flask, _request_ctx_stack
 from flask import current_app as app
 from flask import g as flaskg
                 sh = IPython.Shell.IPShellEmbed(banner=self.banner)
                 sh(global_ns=dict(), local_ns=context)
                 return
-            except ImportError:
+            except AttributeError:
                 # IPython = 0.11
                 import IPython
                 sh = IPython.embed(banner2=self.banner, user_ns=context)
-                sh()
-            finally:
+                return
+            except ImportError:
                 pass
 
         code.interact(self.banner, local=context)