Skip to content

Commit 8c25423

Browse files
committed
Python 2 and 3 support. Convert Exception into BaseException in core code.
1 parent 7938104 commit 8c25423

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

roundup/cgi/exceptions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from roundup.exceptions import LoginError, Unauthorised
77
import cgi
88

9-
class HTTPException(Exception):
9+
class HTTPException(BaseException):
1010
pass
1111

1212
class Redirect(HTTPException):
@@ -18,7 +18,7 @@ class NotFound(HTTPException):
1818
class NotModified(HTTPException):
1919
pass
2020

21-
class DetectorError(Exception):
21+
class DetectorError(BaseException):
2222
"""Raised when a detector throws an exception.
2323
Contains details of the exception."""
2424
def __init__(self, subject, html, txt):
@@ -38,13 +38,13 @@ class FormError(ValueError):
3838
"""
3939
pass
4040

41-
class SendFile(Exception):
41+
class SendFile(BaseException):
4242
"""Send a file from the database."""
4343

44-
class SendStaticFile(Exception):
44+
class SendStaticFile(BaseException):
4545
"""Send a static file from the instance html directory."""
4646

47-
class SeriousError(Exception):
47+
class SeriousError(BaseException):
4848
"""Raised when we can't reasonably display an error message on a
4949
templated page.
5050

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ def anti_csrf_nonce(self, client, lifetime=None):
109109

110110
### templating
111111

112-
class NoTemplate(Exception):
112+
class NoTemplate(BaseException):
113113
pass
114114

115-
class Unauthorised(Exception):
115+
class Unauthorised(BaseException):
116116
def __init__(self, action, klass, translator=None):
117117
self.action = action
118118
self.klass = klass

roundup/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
### Exceptions
2424

25-
class ConfigurationError(Exception):
25+
class ConfigurationError(BaseException):
2626
pass
2727

2828
class NoConfigError(ConfigurationError):

roundup/exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
__docformat__ = 'restructuredtext'
55

6-
class LoginError(Exception):
6+
class LoginError(BaseException):
77
pass
88

9-
class Unauthorised(Exception):
9+
class Unauthorised(BaseException):
1010
pass
1111

12-
class Reject(Exception):
12+
class Reject(BaseException):
1313
"""An auditor may raise this exception when the current create or set
1414
operation should be stopped.
1515

roundup/instance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def registerAction(self, name, action):
257257
def registerUtil(self, name, function):
258258
self.templating_utils[name] = function
259259

260-
class TrackerError(Exception):
260+
class TrackerError(BaseException):
261261
pass
262262

263263

roundup/mailgw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ class MailGWError(ValueError):
119119
class MailUsageError(ValueError):
120120
pass
121121

122-
class MailUsageHelp(Exception):
122+
class MailUsageHelp(BaseException):
123123
""" We need to send the help message to the user. """
124124
pass
125125

126-
class Unauthorized(Exception):
126+
class Unauthorized(BaseException):
127127
""" Access denied """
128128
pass
129129

130-
class IgnoreMessage(Exception):
130+
class IgnoreMessage(BaseException):
131131
""" A general class of message that we should ignore. """
132132
pass
133133
class IgnoreBulk(IgnoreMessage):

0 commit comments

Comments
 (0)