tools/trace: Dump NULL literally.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 28 Sep 2011 19:25:40 +0000 (20:25 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 29 Sep 2011 16:43:36 +0000 (17:43 +0100)
Instead of None.

src/gallium/tools/trace/model.py

index e76aad7788b08b5572750ca8e267db5b68038d90..9f2d5bc7e9d4820a52a82ee57b4ab08ae354ccc2 100755 (executable)
@@ -151,6 +151,10 @@ class PrettyPrinter:
         self.formatter = formatter
     
     def visit_literal(self, node):
+        if node.value is None:
+            self.formatter.literal('NULL')
+            return
+
         if isinstance(node.value, basestring):
             if len(node.value) >= 4096 or node.value.strip(string.printable):
                 self.formatter.address('blob(%u)' % len(node.value))