Fix crash when discovery fails while using -p no:terminal

This commit is contained in:
Anthony Sottile
2019-06-27 10:24:29 -07:00
parent 65fbdf2568
commit 4e723d6750
3 changed files with 10 additions and 3 deletions

View File

@@ -323,7 +323,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"