rfrank/ppgen — pull request #56 by wf49670 (2014-11-09 19:11:42+00:00)
Title: Catch exception if wrapping fails due to no blanks in line being wrapped

Reported by kdweeks via email.

Code already had a try/except for splitting between 0 and width, but the splitting in the except clause was unprotected, leading to a Python exception if there were no blanks in the line further to the right, either. Added another try/except to protect that, adjusted one error message for clarity, and made sure that if we can't split the remainder of the line that we don't get an extra blank line added.