Patch by Sean Silva to un-barf his computer by explicitly removing the '\n'
character instead of always the last character.
llvm-svn: 162767
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index de0585d..f7b3a07 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -237,9 +237,8 @@
# 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, (