Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

sphinxtogithub: Do not error out on older versions of sphinx

Disable sphinxtogithub if sphinx is too old.
Issue a warning when it happens.

Signed-off-by: David Aguilar <>
  • Loading branch information...
1 parent 7849a83 commit 6aaad58f64ee927eb33ef48d99c6c889c7baddbf @davvid davvid committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 extras/sphinxtogithub/
6 extras/sphinxtogithub/
@@ -1,6 +1,7 @@
#! /usr/bin/env python
from optparse import OptionParser
+import warnings
import os
import sys
import shutil
@@ -316,9 +317,12 @@ def sphinx_extension(app, exception):
def setup(app):
"Setup function for Sphinx Extension"
+ if (not hasattr(app, 'add_config_value') or
+ not hasattr(app, 'connect')):
+ warnings.warn('Could not call add_config_value() in sphinxtogithub')
+ return
app.add_config_value("sphinx_to_github", True, '')
app.add_config_value("sphinx_to_github_verbose", True, '')
app.connect("build-finished", sphinx_extension)

0 comments on commit 6aaad58

Please sign in to comment.
Something went wrong with that request. Please try again.