From 316b1c43d3dacb5ecd5c9748b7dc895fc629129a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 1 Nov 2016 21:14:21 +0100 Subject: [PATCH] Modernize UrbanDict so 2to3 makes it work. --- UrbanDict/SOAP.py | 5 ++--- UrbanDict/__init__.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UrbanDict/SOAP.py b/UrbanDict/SOAP.py index c4727af..c9ffcaa 100644 --- a/UrbanDict/SOAP.py +++ b/UrbanDict/SOAP.py @@ -87,7 +87,6 @@ import base64 import cgi import urllib -import exceptions import copy import re import socket @@ -118,7 +117,7 @@ ################################################################################ # Exceptions ################################################################################ -class Error(exceptions.Exception): +class Error(Exception): def __init__(self, msg): self.msg = msg def __str__(self): @@ -1880,7 +1879,7 @@ def cleanDate(d, first = 0): if d[2] > months[d[1]] + leap: raise ValueError, "day out of range" -class UnderflowError(exceptions.ArithmeticError): +class UnderflowError(ArithmeticError): pass def debugHeader(title): diff --git a/UrbanDict/__init__.py b/UrbanDict/__init__.py index 3f9bb69..8bd114a 100644 --- a/UrbanDict/__init__.py +++ b/UrbanDict/__init__.py @@ -48,6 +48,7 @@ import config import plugin +from imp import reload reload(plugin) # In case we're being reloaded. # Add more reloads here if you add third-party modules and want them to be # reloaded when this plugin is reloaded. Don't forget to import them as well!