Ticket #18013: except_as_more.diff

File except_as_more.diff, 1.2 KB (added by Alex Ogier, 13 years ago)

A few more cases from recent trunk changes

  • django/core/management/__init__.py

    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):  
    5151    # of the app_name but the project directory itself isn't on the path.
    5252    try:
    5353        f, path, descr = imp.find_module(part,path)
    54     except ImportError,e:
     54    except ImportError as e:
    5555        if os.path.basename(os.getcwd()) != part:
    5656            raise e
    5757
  • tests/regressiontests/templates/nodelist.py

    diff --git a/tests/regressiontests/templates/nodelist.py b/tests/regressiontests/templates/nodelist.py
    index b786536..97aa5af 100644
    a b class ErrorIndexTest(TestCase):  
    5252            template = get_template_from_string(source)
    5353            try:
    5454                template.render(context)
    55             except (RuntimeError, TypeError), e:
     55            except (RuntimeError, TypeError) as e:
    5656                error_source_index = e.django_template_source[1]
    5757                self.assertEqual(error_source_index,
    5858                                 expected_error_source_index)
Back to Top