Patchwork [2,of,8] check-seclevel: pass a ui to the extension loader

login
register
mail settings
Submitter Bryan O'Sullivan
Date Dec. 23, 2015, 6:24 a.m.
Message ID <a29971f960ad845a4ffa.1450851880@bryano-mbp.local>
Download mbox | patch
Permalink /patch/12266/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Bryan O'Sullivan - Dec. 23, 2015, 6:24 a.m.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Date 1450849086 28800
#      Tue Dec 22 21:38:06 2015 -0800
# Node ID a29971f960ad845a4ffac06d7d1b7901d05268f7
# Parent  61485e243f6516ee33c8ccfb664cd896ce090f23
check-seclevel: pass a ui to the extension loader

Without this, if an import error occurs (as with pypy), the attempt to
report it fails since ui is None.

Patch

diff --git a/doc/check-seclevel.py b/doc/check-seclevel.py
--- a/doc/check-seclevel.py
+++ b/doc/check-seclevel.py
@@ -87,7 +87,7 @@  def checkhghelps(ui):
 
     for name in sorted(extensions.enabled().keys() +
                        extensions.disabled().keys()):
-        mod = extensions.load(None, name, None)
+        mod = extensions.load(ui, name, None)
         if not mod.__doc__:
             ui.note(('skip checking %s extension: no help document\n') % name)
             continue