Fixed the total matches problem.

This commit is contained in:
Jeremy Fincher 2003-08-18 21:32:11 +00:00
parent 6560f9e7ae
commit 861e29c391

View File

@ -341,6 +341,9 @@ class Http(callbacks.Privmsg):
(package, branch)) (package, branch))
html = fd.read() html = fd.read()
fd.close() fd.close()
m = self._debnumpkgsre.search(html)
if m:
numberOfPackages = m.group(1)
m = self._debtablere.search(html) m = self._debtablere.search(html)
if m is None: if m is None:
responses.append('No package found for: %s (%s)' % \ responses.append('No package found for: %s (%s)' % \
@ -348,9 +351,6 @@ class Http(callbacks.Privmsg):
else: else:
tableData = m.group(1) tableData = m.group(1)
rows = tableData.split('</TR>') rows = tableData.split('</TR>')
m = self._debnumpkgsre.search(tableData)
if m:
numberOfPackages += int(m.group(1))
for row in rows: for row in rows:
pkgMatch = self._debpkgre.search(row) pkgMatch = self._debpkgre.search(row)
brMatch = self._debbrre.search(row) brMatch = self._debbrre.search(row)