david / django-roa (http://welldev.org/)

Turn your models into remote resources that you can access through Django's ORM. ROA stands for Resource Oriented Architecture.

Clone this repository (size: 560.7 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-roa

Changed (Δ84 bytes):

raw changeset »

django_roa/db/exceptions.py (7 lines added, 4 lines removed)

Up to file-list django_roa/db/exceptions.py:

@@ -22,10 +22,13 @@ class ROAException(Exception):
22
22
    
23
23
    def parse_django_error(self):
24
24
        """Extract the summary part of a Django HTML error."""
25
        summary = self.msg.split(u'<body>\n<div id="summary">\n  ', 1)[1]\
26
                          .split(u'<th>Python Executable:</th>', 1)[0]
27
        traceback = self.msg.split(u'\n\nTraceback:', 1)[1]\
28
                            .split(u'</textarea>', 1)[0]
25
        try:
26
            summary = self.msg.split(u'<body>\n<div id="summary">\n  ', 1)[1]\
27
                              .split(u'<th>Python Executable:</th>', 1)[0]
28
            traceback = self.msg.split(u'\n\nTraceback:', 1)[1]\
29
                                .split(u'</textarea>', 1)[0]
30
        except IndexError:
31
            return self.msg
29
32
        result = []
30
33
        title = None
31
34
        for line in strip_tags(summary).split('\n'):