mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
A bit of cleanup work, mostly on the python zegrep portion of debfile
This commit is contained in:
parent
6c898a8757
commit
467688de74
@ -121,13 +121,16 @@ class Debian(callbacks.Privmsg, PeriodicFileDownloader):
|
||||
# that).
|
||||
regexp = privmsgs.getArgs(args).lstrip('^/')
|
||||
try:
|
||||
r = re.compile(regexp, re.I)
|
||||
except re.error, e:
|
||||
irc.error(msg, )
|
||||
re_obj = re.compile(regexp, re.I)
|
||||
except:
|
||||
irc.error(msg, "Error in filename: %s" % regexp)
|
||||
return
|
||||
if self.usePythonZegrep:
|
||||
r = gzip.open(self.contents)
|
||||
r = ifilter(imap(lambda line: r.search(line), fd))
|
||||
fd = gzip.open(self.contents)
|
||||
r = imap(lambda tup: tup[0], \
|
||||
ifilter(lambda tup: tup[0], \
|
||||
imap(lambda line: (re_obj.search(line), line),
|
||||
fd)))
|
||||
(r, w) = popen2.popen4(['zegrep', regexp, self.contents])
|
||||
packages = sets.Set() # Make packages unique
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user