15
15
import stat
16
16
import sys
17
17
import time
18
-
19
18
from email .mime .multipart import MIMEMultipart
20
19
from traceback import format_exc
20
+
21
21
try :
22
22
from OpenSSL .SSL import SysCallError
23
23
except ImportError :
24
24
class SysCallError (Exception ):
25
25
pass
26
26
27
- from roundup .anypy .cgi_ import cgi
28
27
import roundup .anypy .email_ # noqa: F401 -- patches for email library code
29
- import roundup .anypy .random_ as random_ # quality of random checked below
30
-
31
28
from roundup import hyperdb , rest , xmlrpc
32
-
33
- from roundup .anypy import http_ , urllib_ , xmlrpc_
34
- from roundup .anypy .cookie_ import BaseCookie , CookieError , get_cookie_date , \
35
- SimpleCookie
29
+ # quality of random checked below
30
+ from roundup .anypy import http_ , random_ , urllib_ , xmlrpc_
31
+ from roundup .anypy .cgi_ import cgi
32
+ from roundup . anypy . cookie_ import BaseCookie , CookieError , SimpleCookie , get_cookie_date
36
33
from roundup .anypy .html import html_escape
37
- from roundup .anypy .strings import s2b , b2s , bs2b , uchr , is_us
34
+ from roundup .anypy .strings import b2s , bs2b , is_us , s2b , uchr
35
+ from roundup .cgi import TranslationService , accept_language , actions , cgitb , templating
36
+ from roundup .cgi .exceptions import DetectorError , FormError , \
37
+ IndexerQueryError , NotFound , NotModified , Redirect , SendFile , \
38
+ SendStaticFile , SeriousError
38
39
39
- from roundup .cgi import accept_language , actions , cgitb , templating , \
40
- TranslationService
41
- from roundup .cgi .exceptions import (
42
- DetectorError , FormError , IndexerQueryError , NotFound , NotModified ,
43
- Redirect , SendFile , SendStaticFile , SeriousError )
44
40
from roundup .cgi .form_parser import FormParser
45
-
46
41
from roundup .exceptions import LoginError , RateLimitExceeded , Reject , \
47
- RejectRaw , Unauthorised , UsageError
48
-
42
+ RejectRaw , Unauthorised , UsageError
49
43
from roundup .mailer import Mailer , MessageSendError
50
44
51
45
logger = logging .getLogger ('roundup' )
@@ -55,7 +49,6 @@ class SysCallError(Exception):
55
49
else :
56
50
logger .warning ("**SystemRandom not available. Using poor random generator" )
57
51
58
-
59
52
def initialiseSecurity (security ):
60
53
'''Create some Permissions and Roles on the security object
61
54
0 commit comments