From 6116442e81d57fe4c65186f07fe26c5568065b55 Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Mon, 1 Oct 2007 11:05:10 +0000 Subject: Delete some extra leaky vars, also after some testing I discovered read() is much faster than readlines(), see http://dev.gentoo.org/~antarus/projects/portage/stats/StringIOVsFiles.txt svn path=/main/trunk/; revision=7897 --- bin/repoman | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin/repoman') diff --git a/bin/repoman b/bin/repoman index 28b68dab8..2d3ea5c66 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1339,8 +1339,7 @@ for x in scanlist: # Syntax Checks path = checkdir + '/' + y + '.ebuild' myear = time.gmtime(os.stat(path)[ST_MTIME])[0] - file_contents = open(path, 'rb').readlines() - contents = StringIO.StringIO(''.join(file_contents)) + contents = StringIO.StringIO(open(path, 'rb').read()) for check in (EbuildWhitespaceCheck, EbuildQuoteCheck, EbuildAssignmentCheck): c = check(contents) errors = c.Run() @@ -1354,8 +1353,7 @@ for x in scanlist: for e in errors: stats[check.repoman_check_name] += 1 fails[check.repoman_check_name].append(x + '/' + y + '.ebuild: %s' % e[1] % e[0]) - del check, errors - + del check, errors, path, contents, myear if "--force" in myoptions: # The dep_check() calls are the most expensive QA test. If --force -- cgit v1.2.3-1-g7c22