Commit 2bfe175c authored by Romain Courteaud's avatar Romain Courteaud Committed by Sebastien Robin

Do not return unexpected details

parent feead756
......@@ -72,12 +72,14 @@ bt5_list = portal.portal_templates.resolveBusinessTemplateListDependency(bt5.spl
severity = len(bt5_list)\n
if severity == 0:\n
summary = "Nothing to do."\n
detail = "Needed to install %s" % \', \'.join([x[1] for x in bt5_list])\n
else:\n
summary = "Upgrade needed"\n
detail = ""\n
active_result.edit(\n
summary=summary, \n
severity=severity, \n
detail="Needed to install %s" % \', \'.join([x[1] for x in bt5_list]))\n
severity=severity,\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
......
......@@ -66,14 +66,17 @@ active_result = ActiveResult()\n
if promise_url != url:\n
severity = 1\n
summary = "Conversion Server not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result.edit(\n
summary=summary, \n
severity=severity, \n
detail="Expect %s\\nGot %s" % (promise_url, url))\n
detail=detail)\n
\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
......
......@@ -58,7 +58,9 @@ promise_url = portal.getPromiseParameter(\'external_service\', \'kumofs_url\')\n
if promise_url is None:\n
return\n
\n
plugin = portal.portal_memcached.persistent_memcached_plugin\n
plugin = portal.portal_memcached.restrictedTraverse("persistent_memcached_plugin", None)\n
if plugin is None:\n
return\n
\n
url = "memcached://%s/" % plugin.getUrlString()\n
\n
......
......@@ -77,14 +77,16 @@ active_result = ActiveResult()\n
if promise_url != url:\n
severity = 1\n
summary = "SMTP Server not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result.edit(\n
summary=summary, \n
severity=severity, \n
detail="Expect %s\\nGot %s" % (promise_url, url))\n
detail=detail)\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
......
......@@ -67,14 +67,17 @@ active_result = ActiveResult()\n
if promise_url != url:\n
severity = 1\n
summary = "Memcached not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result.edit(\n
summary=summary, \n
severity=severity, \n
detail="Expect %s\\nGot %s" % (promise_url, url))\n
severity=severity,\n
detail=detail)\n
\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
......
......@@ -72,14 +72,17 @@ active_result = ActiveResult()\n
if repository_list != promise_repository_list:\n
severity = 1\n
summary = "Template tool not configured as expected"\n
detail = \'\\n\'.join(promise_repository_list)\n
else:\n
severity = 0\n
summary = "Nothing to do."\n
detail = ""\n
\n
active_result.edit(\n
summary=summary, \n
severity=severity, \n
detail=\'\\n\'.join(promise_repository_list))\n
severity=severity,\n
detail=detail)\n
\n
\n
context.newActiveProcess().postResult(active_result)\n
</string> </value>
......
1
\ No newline at end of file
2
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment