Commits

rodolphe committed 83628ca

Trap error on 404

Comments (0)

Files changed (1)

django_mailman/models.py

         opener = urllib2.build_opener(MultipartPostHandler(self.encoding))
 
         all_members = []
-        content = opener.open(url, data).read()
+        try:
+            content = opener.open(url, data).read()
+        except urllib2.HTTPError as error:
+            print "%s %s" % (error, url)
+            return []
+    
         (letters, members, chunks) = self.__parse_member_content(content, self.encoding)
         all_members.extend(members)
         for letter in letters: