diff --git a/plugins/OptionalManager/ContentDbPlugin.py b/plugins/OptionalManager/ContentDbPlugin.py index 84a824fb..a083f621 100644 --- a/plugins/OptionalManager/ContentDbPlugin.py +++ b/plugins/OptionalManager/ContentDbPlugin.py @@ -157,7 +157,10 @@ class ContentDbPlugin(object): def setContentFilesOptional(self, site, content_inner_path, content, cur=None): if not cur: cur = self - cur.execute("BEGIN") + try: + cur.execute("BEGIN") + except Exception, err: + self.log.warning("Transaction begin error %s %s: %s" % (site, content_inner_path, Debug.formatException(err))) num = 0 site_id = self.site_ids[site.address] @@ -190,8 +193,10 @@ class ContentDbPlugin(object): num += 1 if cur == self: - cur.execute("END") - + try: + cur.execute("END") + except Exception, err: + self.log.warning("Transaction end error %s %s: %s" % (site, content_inner_path, Debug.formatException(err))) return num def setContent(self, site, inner_path, content, size=0): diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 86102e51..018bda2c 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -212,7 +212,7 @@ class ContentManager(object): # Update the content self.contents[content_inner_path] = new_content except Exception, err: - self.log.warning("Content.json parse error: %s" % Debug.formatException(err)) + self.log.warning("%s parse error: %s" % (content_inner_path, Debug.formatException(err))) return [], [] # Content.json parse error # Add changed files to bad files