aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-05-19 22:43:13 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2014-05-19 22:43:13 +0100
commit470592286aa30478bed012ee567a1714c6f047d2 (patch)
treed047a7f5354ef69e5a229bc973c4e89d32d0d229 /libstdc++-v3
parent0f5b01358db7cce3cc3d224edd63ef8e8c9838a9 (diff)
downloadgcc-470592286aa30478bed012ee567a1714c6f047d2.zip
gcc-470592286aa30478bed012ee567a1714c6f047d2.tar.gz
gcc-470592286aa30478bed012ee567a1714c6f047d2.tar.bz2
* python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
From-SVN: r210625
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py10
2 files changed, 9 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 429b168..0b2bf89 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-19 Jonathan Wakely <jwakely@redhat.com>
+
+ * python/libstdcxx/v6/printers.py: Use Python3 raise syntax.
+
2014-05-17 Marc Glisse <marc.glisse@inria.fr>
* libsupc++/new_op.cc: Factor the calls to malloc, use __builtin_expect.
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 1f1f860..623a815 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -51,7 +51,7 @@ def find_type(orig, name):
# anything fancier here.
field = typ.fields()[0]
if not field.is_base_class:
- raise ValueError, "Cannot find type %s::%s" % (str(orig), name)
+ raise ValueError("Cannot find type %s::%s" % (str(orig), name))
typ = field.type
class SharedPointerPrinter:
@@ -276,7 +276,7 @@ class StdTuplePrinter:
# Set the actual head to the first pair.
self.head = self.head.cast (nodes[0].type)
elif len (nodes) != 0:
- raise ValueError, "Top of tuple tree does not consist of a single node."
+ raise ValueError("Top of tuple tree does not consist of a single node.")
self.count = 0
def __iter__ (self):
@@ -289,7 +289,7 @@ class StdTuplePrinter:
raise StopIteration
# Check that this iteration has an expected structure.
if len (nodes) != 2:
- raise ValueError, "Cannot parse more than 2 nodes in a tuple tree."
+ raise ValueError("Cannot parse more than 2 nodes in a tuple tree.")
# - Left node is the next recursion parent.
# - Right node is the actual class contained in the tuple.
@@ -389,7 +389,7 @@ def get_value_from_Rb_tree_node(node):
return p.dereference()
except:
pass
- raise ValueError, "Unsupported implementation for %s" % str(node.type)
+ raise ValueError("Unsupported implementation for %s" % str(node.type))
# This is a pretty printer for std::_Rb_tree_iterator (which is
# std::map::iterator), and has nothing to do with the RbtreeIterator
@@ -827,7 +827,7 @@ class Printer(object):
# A small sanity check.
# FIXME
if not self.compiled_rx.match(name + '<>'):
- raise ValueError, 'libstdc++ programming error: "%s" does not match' % name
+ raise ValueError('libstdc++ programming error: "%s" does not match' % name)
printer = RxPrinter(name, function)
self.subprinters.append(printer)
self.lookup[name] = printer