33
44__docformat__ = 'restructuredtext'
55
6- from roundup .exceptions import LoginError , Unauthorised
6+ from roundup .exceptions import LoginError , Unauthorised # noqa: F401
77
88from roundup .anypy .html import html_escape
99
10+
1011class HTTPException (BaseException ):
1112 pass
1213
14+
1315class Redirect (HTTPException ):
1416 pass
1517
18+
1619class NotFound (HTTPException ):
1720 pass
1821
22+
1923class NotModified (HTTPException ):
2024 pass
2125
26+
2227class PreconditionFailed (HTTPException ):
2328 pass
2429
30+
2531class DetectorError (BaseException ):
2632 """Raised when a detector throws an exception.
2733Contains details of the exception."""
2834 def __init__ (self , subject , html , txt ):
2935 self .subject = subject
3036 self .html = html
3137 self .txt = txt
32- BaseException .__init__ (self , subject + ' ' + txt )
38+ BaseException .__init__ (self , subject + ' ' + txt )
39+
3340
3441class FormError (ValueError ):
3542 """An 'expected' exception occurred during form parsing.
@@ -43,12 +50,15 @@ class FormError(ValueError):
4350 """
4451 pass
4552
53+
4654class SendFile (BaseException ):
4755 """Send a file from the database."""
4856
57+
4958class SendStaticFile (BaseException ):
5059 """Send a static file from the instance html directory."""
5160
61+
5262class SeriousError (BaseException ):
5363 """Raised when we can't reasonably display an error message on a
5464 templated page.
@@ -64,6 +74,6 @@ def __str__(self):
6474<body class="body" marginwidth="0" marginheight="0">
6575 <p class="error-message">%s</p>
6676</body></html>
67- """ % html_escape (self .args [0 ])
77+ """ % html_escape (self .args [0 ])
6878
6979# vim: set filetype=python sts=4 sw=4 et si :
0 commit comments