changeset 6165:8dcf73cc9098

paster: cleanup ishell imports - don't try to import * locally Fixes Python warning.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Sep 2016 00:51:18 +0200
parents ed55f404b28c
children e67b9f4b9d95
files kallithea/lib/paster_commands/ishell.py
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/paster_commands/ishell.py	Tue Sep 06 00:51:18 2016 +0200
+++ b/kallithea/lib/paster_commands/ishell.py	Tue Sep 06 00:51:18 2016 +0200
@@ -29,6 +29,12 @@
 import os
 import sys
 
+# imports, used in IPython shell
+import time
+import shutil
+import datetime
+from kallithea.model.db import *
+
 from kallithea.lib.paster_commands.common import BasePasterCommand
 
 
@@ -47,14 +53,6 @@
         #get SqlAlchemy session
         self._init_session()
 
-        # imports, used in IPython shell
-        import os
-        import sys
-        import time
-        import shutil
-        import datetime
-        from kallithea.model.db import *
-
         try:
             from IPython import embed
             from IPython.config.loader import Config
@@ -62,7 +60,7 @@
             cfg.InteractiveShellEmbed.confirm_exit = False
             embed(config=cfg, banner1="Kallithea IShell.")
         except ImportError:
-            print 'IPython installation is required for ishell'
+            print 'Kallithea ishell requires the IPython Python package'
             sys.exit(-1)
 
     def update_parser(self):