From 220bffd5424ca34e6f4163128d46c4563c8c12d6 Mon Sep 17 00:00:00 2001 From: shihokambara Date: Sun, 24 Sep 2017 21:40:32 +0900 Subject: [PATCH] Make it compatible with python3 --- devserver/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devserver/models.py b/devserver/models.py index 32cf943..7ae90ac 100644 --- a/devserver/models.py +++ b/devserver/models.py @@ -46,17 +46,17 @@ def load_modules(): try: name, class_name = path.rsplit('.', 1) except ValueError: - raise exceptions.ImproperlyConfigured, '%s isn\'t a devserver module' % path + raise exceptions.ImproperlyConfigured("%s isn\'t a devserver module" % path) try: module = __import__(name, {}, {}, ['']) - except ImportError, e: - raise exceptions.ImproperlyConfigured, 'Error importing devserver module %s: "%s"' % (name, e) + except ImportError as e: + raise exceptions.ImproperlyConfigured("Error importing devserver module %s: %s" % (name, e)) try: cls = getattr(module, class_name) except AttributeError: - raise exceptions.ImproperlyConfigured, 'Error importing devserver module "%s" does not define a "%s" class' % (name, class_name) + raise exceptions.ImproperlyConfigured("Error importing devserver module %s does not define a %s class" % (name, class_name)) try: instance = cls(GenericLogger(cls))