Patch by Sean Silva to un-barf his computer by explicitly removing the '\n'
authorBill Wendling <isanbard@gmail.com>
Tue, 28 Aug 2012 17:18:27 +0000 (17:18 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 28 Aug 2012 17:18:27 +0000 (17:18 +0000)
character instead of always the last character.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162767 91177308-0d34-0410-b5e6-96231b3b80d8

docs/conf.py

index de0585ddb006c15b53fdca43d972fd2f62c94438..f7b3a07de8162d1542a67df24d20a07f72a4a136 100644 (file)
@@ -237,9 +237,8 @@ for name in os.listdir(command_guide_path):
     # Otherwise, automatically extract the description.
     file_subpath = os.path.join(command_guide_subpath, name)
     with open(os.path.join(command_guide_path, name)) as f:
-        it = iter(f)
-        title = it.next()[:-1]
-        header = it.next()[:-1]
+        title = f.readline().rstrip('\n')
+        header = f.readline().rstrip('\n')
 
         if len(header) != len(title):
             print >>sys.stderr, (