Merge pull request #5506 from asottile/fix_no_terminal

Fix crash when discovery fails while using `-p no:terminal`
This commit is contained in:
Anthony Sottile
2019-06-27 10:46:43 -07:00
parent 554bff8cc1
commit f4b1c1184f
3 changed files with 11 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ class Collector(Node):
# Respect explicit tbstyle option, but default to "short"
# (None._repr_failure_py defaults to "long" without "fulltrace" option).
tbstyle = self.config.getoption("tbstyle")
tbstyle = self.config.getoption("tbstyle", "auto")
if tbstyle == "auto":
tbstyle = "short"