@@ -72,8 +72,8 @@ def _find_files(root_dir, should_include):
7272 # http://docs.python.org/library/os.html#os.walk
7373 for dir_path , dir_names , file_names in os .walk (root_dir ):
7474 new_paths = [os .path .join (dir_path , file_name ) for file_name in file_names ]
75- new_paths = filter (is_module , new_paths )
76- new_paths = filter (should_include , new_paths )
75+ new_paths = list ( filter (is_module , new_paths ) )
76+ new_paths = list ( filter (should_include , new_paths ) )
7777 paths .extend (new_paths )
7878
7979 return paths
@@ -183,7 +183,7 @@ def assertException(self, exception_type, msg, callable, *args, **kwds):
183183 try :
184184 callable (* args , ** kwds )
185185 raise Exception ("Expected exception: %s: %s" % (exception_type , repr (msg )))
186- except exception_type , err :
186+ except exception_type as err :
187187 self .assertEqual (str (err ), msg )
188188
189189
@@ -228,10 +228,10 @@ class Attachable(object):
228228 """
229229 def __init__ (self , ** kwargs ):
230230 self .__args__ = kwargs
231- for arg , value in kwargs .iteritems ():
231+ for arg , value in kwargs .items ():
232232 setattr (self , arg , value )
233233
234234 def __repr__ (self ):
235235 return "%s(%s)" % (self .__class__ .__name__ ,
236236 ", " .join ("%s=%s" % (k , repr (v ))
237- for k , v in self .__args__ .iteritems ()))
237+ for k , v in self .__args__ .items ()))
0 commit comments