Debug: Fix Python 3 compatibility.

This commit is contained in:
Valentin Lorentz 2013-05-09 10:16:51 +02:00
parent f0e49a0402
commit cd6d9da8e4

View File

@ -40,7 +40,16 @@ import gc
import os import os
import pwd import pwd
import sys import sys
import exceptions try:
import exceptions
except ImportError: # Python 3
import builtins
class exceptions:
"""Pseudo-module"""
pass
for (key, value) in exceptions.__dict__.items():
if isinstance(value, type) and issubclass(value, Exception):
exceptions[key] = value
import supybot.conf as conf import supybot.conf as conf
import supybot.utils as utils import supybot.utils as utils