[orca] Another sanity check for traceit.



commit fb47473cc7e08d80f698904fbd0a7d16a2a6569e
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sat Aug 13 14:50:52 2011 -0400

    Another sanity check for traceit.

 src/orca/debug.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/debug.py b/src/orca/debug.py
index e3c7af7..1bcef7e 100644
--- a/src/orca/debug.py
+++ b/src/orca/debug.py
@@ -391,7 +391,13 @@ def traceit(frame, event, arg):
     if event == 'call':
         argvals = inspect.getargvalues(frame)
         keys = filter(lambda x: x != 'self', argvals[0])
-        values = map(argvals[3].get, keys)
+        try:
+            values = map(argvals[3].get, keys)
+        except TypeError:
+            if len(keys) == 1 and isinstance(keys[0], list):
+                values = map(argvals[3].get, keys[0])
+            else:
+                return traceit
         for i, key in enumerate(keys):
             output += '\n  ARG %s=%s' % (key, values[i])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]