Mercurial > p > roundup > code
changeset 5398:99667a0cbd2d
Python 3 preparation: use list() around filter() as needed.
Tool-assisted patch.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 23:14:04 +0000 |
| parents | f2c5e0f6506e |
| children | dccae35caa59 |
| files | roundup/cgi/PageTemplates/PathIterator.py roundup/cgi/form_parser.py roundup/scripts/roundup_server.py |
| diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/PageTemplates/PathIterator.py Tue Jul 24 23:13:17 2018 +0000 +++ b/roundup/cgi/PageTemplates/PathIterator.py Tue Jul 24 23:14:04 2018 +0000 @@ -34,7 +34,7 @@ return ob1 == ob2 if isinstance(name, type('')): name = name.split('/') - name = filter(None, name) + name = list(filter(None, name)) securityManager = getSecurityManager() try: ob1 = restrictedTraverse(ob1, name, securityManager)
--- a/roundup/cgi/form_parser.py Tue Jul 24 23:13:17 2018 +0000 +++ b/roundup/cgi/form_parser.py Tue Jul 24 23:14:04 2018 +0000 @@ -655,6 +655,6 @@ value = [i.strip() for i in values.split(',')] # filter out the empty bits - return filter(None, value) + return list(filter(None, value)) # vim: set et sts=4 sw=4 :
--- a/roundup/scripts/roundup_server.py Tue Jul 24 23:13:17 2018 +0000 +++ b/roundup/scripts/roundup_server.py Tue Jul 24 23:14:04 2018 +0000 @@ -367,7 +367,7 @@ length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length - co = filter(None, self.headers.getheaders('cookie')) + co = list(filter(None, self.headers.getheaders('cookie'))) if co: env['HTTP_COOKIE'] = ', '.join(co) env['HTTP_AUTHORIZATION'] = self.headers.getheader('authorization')
