summaryrefslogtreecommitdiff
path: root/ptr.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-02-10 14:55:54 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-02-10 14:58:40 -0500
commit95f4e9fbd57add2505f0325bd53246389f46006c (patch)
tree1b11c77ce565761b83835c077b43415743500db8 /ptr.py
parent016a84e3bc1ec56b6986b3f33144892ac618a5d5 (diff)
downloadpytest-runner-95f4e9fbd57add2505f0325bd53246389f46006c.tar.gz
Avoid AttributeError when self.result_code was not set, such as when running with dry_run. Fixes #38.
Diffstat (limited to 'ptr.py')
-rw-r--r--ptr.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ptr.py b/ptr.py
index 56a5c00..3de0129 100644
--- a/ptr.py
+++ b/ptr.py
@@ -192,9 +192,8 @@ class PyTest(orig.test):
don't install them anywhere).
"""
self._super_run()
- if self.result_code:
+ if getattr(self, 'result_code', None):
raise SystemExit(self.result_code)
- return self.result_code
@property
def _argv(self):