diff --git a/docs/man/conf.py b/docs/man/conf.py
index 0cf8bc61..7df4ed25 100644
--- a/docs/man/conf.py
+++ b/docs/man/conf.py
@@ -265,7 +265,7 @@ for mansubdir in ('man1', 'man7'):
             froot, fext = os.path.splitext(fname)
             if fext == '.rst':
                 man_page = (os.path.join(mansubdir, froot), froot, '',
-                        [], 7)
+                        [], mansubdir[-1])
                 man_pages.append(man_page)
 
 #man_pages = [