def _set_cve_plaintext_width(self, wrapWidth):
if wrapWidth == 1:
if sys.stdin.isatty():
wrapWidth = self._get_terminal_width() - 2
else:
logger.warning("Stdin redirection suppresses term-width auto-detection; setting WIDTH to 70")
wrapWidth = 70
if wrapWidth:
self.wrapper = textwrap.TextWrapper(width=wrapWidth, initial_indent=" ", subsequent_indent=" ", replace_whitespace=False)
else:
self.wrapper = 0
logger.debug("Set wrapWidth to '{0}'".format(wrapWidth))
评论列表
文章目录