Commits

Yuya Nishihara  committed 82cdc38

move code for post-processing doc to common place

  • Participants
  • Parent commits 75d87cd

Comments (0)

Files changed (1)

File hgext/fixfrozenexts.py

 def _disabledzippedhelp(path):
     zf = zipfile.ZipFile(_libpath())
     try:
-        doc = _extractzippeddoc(zf, path)
-        if doc: # extracting localized synopsis
-            return gettext(doc).splitlines()[0]
-        else:
-            return _('(no help text available)')
+        return _extractzippeddoc(zf, path)
     finally:
         zf.close()
 
 def _disabledhelp(orig, path):
-    return _disabledzippedhelp(path)
+    doc = _disabledzippedhelp(path)
+    if doc: # extracting localized synopsis
+        return gettext(doc).splitlines()[0]
+    else:
+        return _('(no help text available)')
 
 def extsetup():
     if not util.main_is_frozen():