summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-22 21:45:02 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-22 21:45:02 (GMT)
commit865ea892018f4ff823496b2d0636c47c7ef06231 (patch)
tree4d73a54195780fa603774c8636ee13688932246f /Lib
parente405037abc60657d7865fa02b248b84825715a2d (diff)
downloadcpython-865ea892018f4ff823496b2d0636c47c7ef06231.zip
cpython-865ea892018f4ff823496b2d0636c47c7ef06231.tar.gz
cpython-865ea892018f4ff823496b2d0636c47c7ef06231.tar.bz2
Fix raise statements in hotshot.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/hotshot/log.py8
-rw-r--r--Lib/hotshot/stats.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/hotshot/log.py b/Lib/hotshot/log.py
index 880b25c..b211825 100644
--- a/Lib/hotshot/log.py
+++ b/Lib/hotshot/log.py
@@ -70,7 +70,7 @@ class LogReader:
try:
return self._filemap[fileno]
except KeyError:
- raise ValueError, "unknown fileno"
+ raise ValueError("unknown fileno")
def get_filenames(self):
return self._filemap.values()
@@ -80,13 +80,13 @@ class LogReader:
for fileno, name in self._filemap.items():
if name == filename:
return fileno
- raise ValueError, "unknown filename"
+ raise ValueError("unknown filename")
def get_funcname(self, fileno, lineno):
try:
return self._funcmap[(fileno, lineno)]
except KeyError:
- raise ValueError, "unknown function location"
+ raise ValueError("unknown function location")
# Iteration support:
# This adds an optional (& ignored) parameter to next() so that the
@@ -127,7 +127,7 @@ class LogReader:
self.cwd = lineno
self.addinfo(tdelta, lineno)
else:
- raise ValueError, "unknown event type"
+ raise ValueError("unknown event type")
def __iter__(self):
return self
diff --git a/Lib/hotshot/stats.py b/Lib/hotshot/stats.py
index 7ff2277..e927bd5 100644
--- a/Lib/hotshot/stats.py
+++ b/Lib/hotshot/stats.py
@@ -90,4 +90,4 @@ class FakeFrame:
def _brokentimer():
- raise RuntimeError, "this timer should not be called"
+ raise RuntimeError("this timer should not be called")