From e6264461ad16af584cae4270dde226f5405aa7d9 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Tue, 30 Aug 2005 21:50:19 +0000 Subject: Massive style cleanup: Move to new raise exception style; for motivation, see: http://permalink.gmane.org/gmane.comp.web.zope.zope3/13884 --- ndiff.py | 4 ++-- talinterpreter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ndiff.py b/ndiff.py index 5c644c6..7873abc 100644 --- a/ndiff.py +++ b/ndiff.py @@ -514,7 +514,7 @@ def fancy_replace(a, alo, ahi, b, blo, bhi): atags = atags + ' ' * la btags = btags + ' ' * lb else: - raise ValueError, 'unknown tag ' + `tag` + raise ValueError('unknown tag ' + `tag`) printq(aelt, belt, atags, btags) else: # the synch pair is identical @@ -588,7 +588,7 @@ def fcompare(f1name, f2name): elif tag == 'equal': dump(' ', a, alo, ahi) else: - raise ValueError, 'unknown tag ' + `tag` + raise ValueError('unknown tag ' + `tag`) return 1 diff --git a/talinterpreter.py b/talinterpreter.py index 6506686..d4f16d4 100644 --- a/talinterpreter.py +++ b/talinterpreter.py @@ -1026,4 +1026,4 @@ class FasterStringIO(StringIO): def _write_ValueError(s): - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") -- cgit v1.2.1