summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-10-01 11:05:10 +0000
committerAlec Warner <antarus@gentoo.org>2007-10-01 11:05:10 +0000
commit6116442e81d57fe4c65186f07fe26c5568065b55 (patch)
treeb5dfea5b06eb65b3202c5ea6286be531c817fcf6 /bin
parent03f423b324210ff5044905920c7ab73661468d5d (diff)
downloadportage-6116442e81d57fe4c65186f07fe26c5568065b55.tar.gz
portage-6116442e81d57fe4c65186f07fe26c5568065b55.tar.bz2
portage-6116442e81d57fe4c65186f07fe26c5568065b55.zip
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman6
1 files changed, 2 insertions, 4 deletions
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