Mercurial > p > roundup > code
comparison roundup/backends/sessions_rdbms.py @ 5806:abee2c2c822e
More cgi.escape/html.escape fixes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 12 Jun 2019 19:17:37 -0400 |
| parents | 62de601bdf6f |
| children | 883c9e90b403 |
comparison
equal
deleted
inserted
replaced
| 5805:39a5f40ae4d4 | 5806:abee2c2c822e |
|---|---|
| 4 Yes, it's called "sessions" - because originally it only defined a session | 4 Yes, it's called "sessions" - because originally it only defined a session |
| 5 class. It's now also used for One Time Key handling too. | 5 class. It's now also used for One Time Key handling too. |
| 6 """ | 6 """ |
| 7 __docformat__ = 'restructuredtext' | 7 __docformat__ = 'restructuredtext' |
| 8 import os, time, logging | 8 import os, time, logging |
| 9 from cgi import escape | 9 |
| 10 try: | |
| 11 from html import escape | |
| 12 except ImportError: | |
| 13 from cgi import escape | |
| 10 | 14 |
| 11 class BasicDatabase: | 15 class BasicDatabase: |
| 12 ''' Provide a nice encapsulation of an RDBMS table. | 16 ''' Provide a nice encapsulation of an RDBMS table. |
| 13 | 17 |
| 14 Keys are id strings, values are automatically marshalled data. | 18 Keys are id strings, values are automatically marshalled data. |
