Blob Blame History Raw
diff -ru sphinxcontrib.orig/spelling/directive.py sphinxcontrib/spelling/directive.py
--- sphinxcontrib.orig/spelling/directive.py	2015-06-14 11:21:20.000000000 -0400
+++ sphinxcontrib/spelling/directive.py	2016-07-20 17:27:02.799919414 -0400
@@ -39,10 +39,11 @@
                 continue
             good_words.extend(entry.split())
         if good_words:
-            env.app.debug(
-                'Extending local dictionary for %s with %s' % (
-                    env.docname, str(good_words))
-            )
+            if hasattr(env.app, 'debug'):
+                env.app.debug(
+                    'Extending local dictionary for %s with %s' % (
+                        env.docname, str(good_words))
+                )
             env.spelling_document_filters[env.docname].append(
                 filters.IgnoreWordsFilterFactory(good_words)
                 )