improve rendering of popup error/warning messages
[myslice.git] / manifold / core / result_value.py
index 9eb7a93..7728e8a 100644 (file)
@@ -1,6 +1,7 @@
 # Inspired from GENI error codes
 
 import time
+import pprint
 
 class ResultValue(dict):
 
@@ -94,6 +95,10 @@ class ResultValue(dict):
     def ok_value(self):
         return self['value']
 
+    @staticmethod
+    def to_html (raw_dict):
+        return pprint.pformat (raw_dict).replace("\\n","<br/>")
+
 # 67    <code>
 # 68      <value>9</value>
 # 69      <label>DBERROR</label>