Browse Source

Merge pull request #3307 from blink1073/fix-traceback-print

Minor Build System Cleanup
Afshin Darian 7 years ago
parent
commit
2995706dc1
3 changed files with 6 additions and 6 deletions
  1. 1 1
      docs/notebook.md
  2. 3 3
      jupyterlab/commands.py
  3. 2 2
      jupyterlab/labextensions.py

+ 1 - 1
docs/notebook.md

@@ -208,7 +208,7 @@ Run the following commands:
 ```
 npm install
 npm run build
-jupyter labextension link .
+jupyter labextension install .
 jupyter lab
 ```
 

+ 3 - 3
jupyterlab/commands.py

@@ -175,7 +175,7 @@ def clean(app_dir=None):
         raise ValueError('Cannot clean the dev app')
     if app_dir == pjoin(HERE, 'core'):
         raise ValueError('Cannot clean the core app')
-    for name in ['static', 'staging']:
+    for name in ['staging']:
         target = pjoin(app_dir, name)
         if osp.exists(target):
             shutil.rmtree(target)
@@ -419,12 +419,12 @@ class _AppHandler(object):
             # Extensions that were added.
             for ext in new_jlab[ext_type]:
                 if ext not in old_jlab[ext_type]:
-                    messages.append('%s was added' % ext)
+                    messages.append('%s needs to be included' % ext)
 
             # Extensions that were removed.
             for ext in old_jlab[ext_type]:
                 if ext not in new_jlab[ext_type]:
-                    messages.append('%s was removed' % ext)
+                    messages.append('%s needs to be removed' % ext)
 
         # Look for mismatched dependencies
         for (pkg, dep) in new_deps.items():

+ 2 - 2
jupyterlab/labextensions.py

@@ -54,8 +54,8 @@ class BaseExtensionApp(JupyterApp):
         try:
             self.run_task()
         except Exception as ex:
-            ex_traceback = ex.__traceback__
-            msg = traceback.format_exception(ex.__class__, ex, ex_traceback)
+            _, _, exc_traceback = sys.exc_info()
+            msg = traceback.format_exception(ex.__class__, ex, exc_traceback)
             for line in msg:
                 self.log.debug(line)
             self.log.error(str(ex))