Skip to content

Commit

Permalink
Python 3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pR0Ps committed Dec 3, 2014
1 parent ac2b0ef commit 588fa4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def get_filter(obj):
if obj is None:
return [] # Empty list = accept nothing (optimized in the parser)
elif hasattr(obj, "keys"):
return map(str, obj.keys())
return list(map(str, obj.keys()))
elif isinstance(obj, list):
return map(str, obj)
return list(map(str, obj))
else:
return (str(obj),)
return tuple(str(obj))

class TestUpdater(object):
"""Dump HTML and the scraped data"""
Expand Down Expand Up @@ -64,7 +64,7 @@ def start(self):
def scrape_alphanums(self):
"""Scrape alphanums"""

all_alphanums = self.session.parser.all_alphanums(filter_=get_filter(self.config))
all_alphanums = list(self.session.parser.all_alphanums(filter_=get_filter(self.config)))

for alphanum, subjects in iterkeyvalue(self.config):

Expand Down

0 comments on commit 588fa4f

Please sign in to comment.