summaryrefslogtreecommitdiff
path: root/lldb/examples
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-11-03 19:49:05 +0000
committerZachary Turner <zturner@google.com>2015-11-03 19:49:05 +0000
commit02df6c39a251a1a03640daf5d40730788c09d397 (patch)
tree8c9e8eaf6339e8296b8a4ea55ffa9e0fac2a5294 /lldb/examples
parent79b31584d6c1f074ac95125d67f6a13ed7920f70 (diff)
Python 3 - modernize exception catching syntax.
Old-style syntax: `except Exception, e:` New-style syntax: `except Exception as e:` These two statements are identical, except that the former has been deprecated for may versions, and was removed in Python 3. This converts everything to use the new syntax (which also works in Python 2). I had to convert unittest2 as well. What we really need to do is just delete unittest2, and use unittest instead since it is a standard module that ships with every Python distribution. But this is the path of least resistance for now, although at some point we will really need to do it.
Diffstat (limited to 'lldb/examples')
-rw-r--r--lldb/examples/synthetic/unordered_multi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/examples/synthetic/unordered_multi.py b/lldb/examples/synthetic/unordered_multi.py
index 15bcb02a582..3389a01aea3 100644
--- a/lldb/examples/synthetic/unordered_multi.py
+++ b/lldb/examples/synthetic/unordered_multi.py
@@ -52,7 +52,7 @@ class libcxx_hash_table_SynthProvider:
self.next_element = self.begin_ptr
else:
self.next_element = None
- except Exception, e:
+ except Exception as e:
logger >> "Caught exception: %r" % e
pass