Blob Blame History Raw
--- bro-2.5.1/doc/ext/bro.py	2017-10-01 14:14:44.216864055 -0500
+++ bro-2.5.1/doc/ext/bro.py.new	2017-10-01 14:16:38.837635250 -0500
@@ -14,7 +14,11 @@
 from sphinx.directives import ObjectDescription
 from sphinx.roles import XRefRole
 from sphinx.util.nodes import make_refnode
-from sphinx import version_info
+try:
+    from sphinx import version_info
+    VERSION_INFO_FOUND=True
+except ImportError:
+    VERSION_INFO_FOUND=False

 from docutils import nodes
 from docutils.parsers.rst import Directive
@@ -35,7 +39,7 @@
 # Wrapper for creating a tuple for index nodes, staying backwards
 # compatible to Sphinx < 1.4:
 def make_index_tuple(indextype, indexentry, targetname, targetname2):
-    if version_info >= (1, 4, 0, '', 0):
+    if VERSION_INFO_FOUND and version_info >= (1, 4, 0, '', 0):
         return (indextype, indexentry, targetname, targetname2, None)
     else:
         return (indextype, indexentry, targetname, targetname2)