changeset 5737:e0ea05bd1de8

googleimport: improve exception texts
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 29 Nov 2010 00:11:32 +0100
parents f3e8f2136279
children 02798509e918
files contrib/googleimport/driver.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/googleimport/driver.py	Sun Nov 28 20:28:07 2010 +0100
+++ b/contrib/googleimport/driver.py	Mon Nov 29 00:11:32 2010 +0100
@@ -117,7 +117,7 @@
                 continue
             desc_m = re.search(desc_pattern, page_contents)
             if not desc_m:
-                raise Exception("Desc not found")
+                raise Exception("Could not import %r because Desc not found" % page)
             desc = desc_m.groups()[0]
 
             for i in range(1, count + 1):
@@ -139,7 +139,7 @@
             page_contents = self.server.getPage(page)
             m = re.search(bugpage_pattern, page_contents)
             if not m:
-                raise Exception("bug desc not found")
+                raise Exception("Could not import %r because of bug desc not found" % page)
             desc = m.groups()[0]
             desc = "A user filed a bug report at the MoinMoin site. Here is a short description about the issue. A more detailed description is available at the MoinMoin wiki: %s\n\n" % (self.url + quote(page.encode("utf-8")), ) + desc
             yield Task(bug_name, desc, "Code")
@@ -157,7 +157,7 @@
             count = int(find_dict_entry("Count", page_contents))
             desc_m = re.search(desc_pattern, page_contents)
             if not desc_m:
-                raise Exception("Desc not found")
+                raise Exception("Could not import %r because Desc not found" % page)
             desc = desc_m.groups()[0]
             for i in range(1, count + 1):
                 text = desc