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/
This commit is contained in:
Valentin Lorentz 2015-05-19 19:10:00 +02:00
parent dfb68be410
commit 10a9bc578b
1 changed files with 2 additions and 1 deletions

View File

@ -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)