Commits

Doug Hellmann  committed a3f211a

Fix project template listing when none installed

If there are no project templates installed, show
a nice message instead of a traceback from stevedore.

Fixes issue #179

  • Participants
  • Parent commits f877197

Comments (0)

Files changed (2)

File docs/source/history.rst

   - Rename functions for generating help so they do not pollute the
     global namespace, and especially so they do not interfere with tab
     completion. Contributed by :bbuser:`davidszotten`.
+  - Fix an issue with listing project templates if none are
+    installed. (:bbissue:`179`)
 
 3.7
 

File virtualenvwrapper/hook_loader.py

         def show(ext):
             output.write('  %-10s -- %s\n' %
                          (ext.name, inspect.getdoc(ext.plugin) or ''))
-        hook_mgr.map(show)
+        try:
+            hook_mgr.map(show)
+        except RuntimeError:  # no templates
+            output.write('  No templates installed.\n')
 
     elif options.sourcing:
         def get_source(ext, args):