diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index 8e83304..bd0dd33 100644
a
|
b
|
def find_management_module(app_name):
|
51 | 51 | # of the app_name but the project directory itself isn't on the path. |
52 | 52 | try: |
53 | 53 | f, path, descr = imp.find_module(part,path) |
54 | | except ImportError,e: |
| 54 | except ImportError as e: |
55 | 55 | if os.path.basename(os.getcwd()) != part: |
56 | 56 | raise e |
57 | 57 | |
diff --git a/tests/regressiontests/templates/nodelist.py b/tests/regressiontests/templates/nodelist.py
index b786536..97aa5af 100644
a
|
b
|
class ErrorIndexTest(TestCase):
|
52 | 52 | template = get_template_from_string(source) |
53 | 53 | try: |
54 | 54 | template.render(context) |
55 | | except (RuntimeError, TypeError), e: |
| 55 | except (RuntimeError, TypeError) as e: |
56 | 56 | error_source_index = e.django_template_source[1] |
57 | 57 | self.assertEqual(error_source_index, |
58 | 58 | expected_error_source_index) |