From 588fa4f26d0ffc1cc27028b8bf0f2cadaf923c0e Mon Sep 17 00:00:00 2001 From: pR0Ps Date: Sun, 30 Nov 2014 23:17:23 -0500 Subject: [PATCH] Python 3 fixes --- update_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update_tests.py b/update_tests.py index dfacd88..a926719 100755 --- a/update_tests.py +++ b/update_tests.py @@ -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""" @@ -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):