File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 36
36
def remove_directory_underscores (app , exception ):
37
37
if exception :
38
38
return
39
- app .info (bold ('fixing directory names... ' ), True )
39
+ # Get logger
40
+ try :
41
+ from sphinx .util import logging
42
+ logger = logging .getLogger (__name__ )
43
+ except (ImportError , AttributeError ):
44
+ # Sphinx < 1.6
45
+ logger = app
46
+ logger .info (bold ('fixing directory names... ' ), nonl = True )
40
47
# Rewrite references in HTML/JS files
41
48
for dirpath , _ , filenames in os .walk (app .outdir ):
42
49
for filename in filenames :
@@ -61,7 +68,7 @@ def remove_directory_underscores(app, exception):
61
68
newfile = os .path .join (newdir , filename )
62
69
os .rename (oldfile , newfile )
63
70
os .rmdir (olddir )
64
- app .info ('done' )
71
+ logger .info ('done' )
65
72
66
73
67
74
def setup (app ):
You can’t perform that action at this time.
0 commit comments