Skip to content

Commit 2958c3f

Browse files
committed
Python 3 preparation: use list() around filter() as needed.
Tool-assisted patch.
1 parent 31c45db commit 2958c3f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

roundup/cgi/PageTemplates/PathIterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def same_part(self, name, ob1, ob2):
3434
return ob1 == ob2
3535
if isinstance(name, type('')):
3636
name = name.split('/')
37-
name = filter(None, name)
37+
name = list(filter(None, name))
3838
securityManager = getSecurityManager()
3939
try:
4040
ob1 = restrictedTraverse(ob1, name, securityManager)

roundup/cgi/form_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,6 @@ def extractFormList(self, value):
655655
value = [i.strip() for i in values.split(',')]
656656

657657
# filter out the empty bits
658-
return filter(None, value)
658+
return list(filter(None, value))
659659

660660
# vim: set et sts=4 sw=4 :

roundup/scripts/roundup_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def inner_run_cgi(self):
367367
length = self.headers.getheader('content-length')
368368
if length:
369369
env['CONTENT_LENGTH'] = length
370-
co = filter(None, self.headers.getheaders('cookie'))
370+
co = list(filter(None, self.headers.getheaders('cookie')))
371371
if co:
372372
env['HTTP_COOKIE'] = ', '.join(co)
373373
env['HTTP_AUTHORIZATION'] = self.headers.getheader('authorization')

0 commit comments

Comments
 (0)