Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 5615:14e176b5cd90
merge from upsteam
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 16 Feb 2019 15:21:47 -0500 |
| parents | be99aa02c616 0a8f0fddc2ae |
| children | b3618882f906 |
comparison
equal
deleted
inserted
replaced
| 5614:be99aa02c616 | 5615:14e176b5cd90 |
|---|---|
| 46 from email.mime.base import MIMEBase | 46 from email.mime.base import MIMEBase |
| 47 from email.mime.text import MIMEText | 47 from email.mime.text import MIMEText |
| 48 from email.mime.multipart import MIMEMultipart | 48 from email.mime.multipart import MIMEMultipart |
| 49 import roundup.anypy.email_ | 49 import roundup.anypy.email_ |
| 50 | 50 |
| 51 from roundup.anypy.strings import s2b, b2s, uchr | 51 from roundup.anypy.strings import s2b, b2s, uchr, is_us |
| 52 | 52 |
| 53 def initialiseSecurity(security): | 53 def initialiseSecurity(security): |
| 54 '''Create some Permissions and Roles on the security object | 54 '''Create some Permissions and Roles on the security object |
| 55 | 55 |
| 56 This function is directly invoked by security.Security.__init__() | 56 This function is directly invoked by security.Security.__init__() |
| 1509 # figure the filename - try STATIC_FILES, then TEMPLATES dir | 1509 # figure the filename - try STATIC_FILES, then TEMPLATES dir |
| 1510 for dir_option in ('STATIC_FILES', 'TEMPLATES'): | 1510 for dir_option in ('STATIC_FILES', 'TEMPLATES'): |
| 1511 prefix = self.instance.config[dir_option] | 1511 prefix = self.instance.config[dir_option] |
| 1512 if not prefix: | 1512 if not prefix: |
| 1513 continue | 1513 continue |
| 1514 if type(prefix) is str: | 1514 if is_us(prefix): |
| 1515 # prefix can be a string or list depending on | 1515 # prefix can be a string or list depending on |
| 1516 # option. Make it a list to iterate over. | 1516 # option. Make it a list to iterate over. |
| 1517 prefix = [ prefix ] | 1517 prefix = [ prefix ] |
| 1518 | 1518 |
| 1519 for p in prefix: | 1519 for p in prefix: |
