diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 18:45:25 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-23 18:45:25 +0900 |
commit | 1bdf0451a0b74612660686f5cf31cbc5549506e1 (patch) | |
tree | 4fb583ee7e308ece66e6d187ebb6df54dce9fed6 | |
parent | 72d29f04527e110a7b725bc21bbbc5656077d457 (diff) | |
download | buildstream-1bdf0451a0b74612660686f5cf31cbc5549506e1.tar.gz |
exceptions.py: _get_last_exception() clear the exception after fetching it
Ensure test cases dont have remnent exceptions from a previous test.
-rw-r--r-- | buildstream/exceptions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/exceptions.py b/buildstream/exceptions.py index 7e334a369..5a9cd455d 100644 --- a/buildstream/exceptions.py +++ b/buildstream/exceptions.py @@ -30,7 +30,11 @@ _last_exception = None def _get_last_exception(): - return _last_exception + global _last_exception + + le = _last_exception + _last_exception = None + return le # BstError is an internal base exception class for BuildSream |