Fixed UnboundLocalError from a variable name change in debfile.

This commit is contained in:
Jeremy Fincher 2003-09-06 01:06:28 +00:00
parent da329a3196
commit 8f2766b5ce

View File

@ -109,19 +109,18 @@ class Debian(callbacks.Privmsg, PeriodicFileDownloader):
# (the filenames don't have leading slashes, and people may not know # (the filenames don't have leading slashes, and people may not know
# that). # that).
regexp = privmsgs.getArgs(args).lstrip('^/') regexp = privmsgs.getArgs(args).lstrip('^/')
regexp = '^' + regexp
try: try:
r = re.compile(regexp, re.I) r = re.compile(regexp, re.I)
except re.error, e: except re.error, e:
irc.error(msg, e) irc.error(msg, e)
return return
if self.usePythonZegrep: if self.usePythonZegrep:
fd = gzip.open(self.contents) r = gzip.open(self.contents)
fd = ifilter(imap(lambda line: r.search(line), fd)) r = ifilter(imap(lambda line: r.search(line), fd))
(r, w) = popen2.popen4(['zegrep', regexp, self.contents]) (r, w) = popen2.popen4(['zegrep', regexp, self.contents])
packages = [] packages = []
try: try:
for line in fd: for line in r:
try: try:
(filename, package) = line[:-1].split() (filename, package) = line[:-1].split()
if filename == 'FILE': if filename == 'FILE':