From 10a9bc578bee0f120de7f9548ade9fb26e4b306a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 19 May 2015 19:10:00 +0200 Subject: [PATCH] Owner: Don't crash on "upkeep high" on Python 3. Python 3's except statement removes the need for sys.exc_clear, see https://www.python.org/dev/peps/pep-3100/ --- plugins/Owner/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index dc8de8981..20fdafce1 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -398,7 +398,8 @@ class Owner(callbacks.Plugin): L.append(format('linecache line cache flushed: %n cleared.', (len(linecache.cache), 'line'))) linecache.clearcache() - sys.exc_clear() + if sys.version_info[0] < 3: + sys.exc_clear() collected = world.upkeep() if gc.garbage: L.append('Garbage! %r.' % gc.garbage)