Commit 9a5fd30c authored by Jason Madden's avatar Jason Madden

Fix leakchecks.

parent 86cbafe9
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# A vendored version of part of https://github.com/ionelmc/python-tblib # A vendored version of part of https://github.com/ionelmc/python-tblib
#### ####
# Copyright (c) 2013-2014, Ionel Cristian Mărieș # Copyright (c) 2013-2016, Ionel Cristian Mărieș
# All rights reserved. # All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
...@@ -196,7 +196,12 @@ class Traceback(object): ...@@ -196,7 +196,12 @@ class Traceback(object):
except: except:
tb = sys.exc_info()[2].tb_next tb = sys.exc_info()[2].tb_next
tb_set_next(tb, self.tb_next and self.tb_next.as_traceback()) tb_set_next(tb, self.tb_next and self.tb_next.as_traceback())
try:
return tb return tb
finally:
# gevent: don't leak the traceback objects, this
# makes our leaktests fail
del tb
else: else:
raise RuntimeError("Cannot re-create traceback !") raise RuntimeError("Cannot re-create traceback !")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment