Kaydet (Commit) 865ea892 authored tarafından Collin Winter's avatar Collin Winter

Fix raise statements in hotshot.

üst e405037a
...@@ -70,7 +70,7 @@ class LogReader: ...@@ -70,7 +70,7 @@ class LogReader:
try: try:
return self._filemap[fileno] return self._filemap[fileno]
except KeyError: except KeyError:
raise ValueError, "unknown fileno" raise ValueError("unknown fileno")
def get_filenames(self): def get_filenames(self):
return self._filemap.values() return self._filemap.values()
...@@ -80,13 +80,13 @@ class LogReader: ...@@ -80,13 +80,13 @@ class LogReader:
for fileno, name in self._filemap.items(): for fileno, name in self._filemap.items():
if name == filename: if name == filename:
return fileno return fileno
raise ValueError, "unknown filename" raise ValueError("unknown filename")
def get_funcname(self, fileno, lineno): def get_funcname(self, fileno, lineno):
try: try:
return self._funcmap[(fileno, lineno)] return self._funcmap[(fileno, lineno)]
except KeyError: except KeyError:
raise ValueError, "unknown function location" raise ValueError("unknown function location")
# Iteration support: # Iteration support:
# This adds an optional (& ignored) parameter to next() so that the # This adds an optional (& ignored) parameter to next() so that the
...@@ -127,7 +127,7 @@ class LogReader: ...@@ -127,7 +127,7 @@ class LogReader:
self.cwd = lineno self.cwd = lineno
self.addinfo(tdelta, lineno) self.addinfo(tdelta, lineno)
else: else:
raise ValueError, "unknown event type" raise ValueError("unknown event type")
def __iter__(self): def __iter__(self):
return self return self
......
...@@ -90,4 +90,4 @@ class FakeFrame: ...@@ -90,4 +90,4 @@ class FakeFrame:
def _brokentimer(): def _brokentimer():
raise RuntimeError, "this timer should not be called" raise RuntimeError("this timer should not be called")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment