@@ -158,17 +158,18 @@ def __repr__(self):
158158 self .name , self .version , self .path )
159159
160160 def _get_records (self , local = False ):
161+ results = []
161162 with self .get_distinfo_file ('RECORD' ) as record :
162163 record_reader = csv .reader (record , delimiter = ',' ,
163164 lineterminator = '\n ' )
164- # XXX needs an explaining comment
165165 for row in record_reader :
166- path , checksum , size = ( row [:] +
167- [ None for i in range ( len ( row ), 3 )])
166+ missing = [ None for i in range ( len ( row ), 3 )]
167+ path , checksum , size = row + missing
168168 if local :
169169 path = path .replace ('/' , os .sep )
170170 path = os .path .join (sys .prefix , path )
171- yield path , checksum , size
171+ results .append ((path , checksum , size ))
172+ return results
172173
173174 def get_resource_path (self , relative_path ):
174175 with self .get_distinfo_file ('RESOURCES' ) as resources_file :
@@ -197,7 +198,8 @@ def list_installed_files(self, local=False):
197198 :type local: boolean
198199 :returns: iterator of (path, md5, size)
199200 """
200- return self ._get_records (local )
201+ for result in self ._get_records (local ):
202+ yield result
201203
202204 def uses (self , path ):
203205 """
0 commit comments