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