Explorar el Código

Reverse search result order

master
JustAnotherArchivist hace 3 años
padre
commit
359ec58637
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      irclog.py

+ 1
- 1
irclog.py Ver fichero

@@ -914,7 +914,7 @@ class WebServer:
ln = int(ln)
ts = float(line.split(' ', 1)[0])
out.append((ts, fn, ln, path, line))
yield from (x[3:] for x in sorted(out, key = lambda y: y[0:3]))
yield from (x[3:] for x in sorted(out, key = lambda y: y[0:3], reverse = True))

def _raw_to_lines(self, f, filter = lambda path, dt, command, content: True):
# f: iterable producing tuples (path, line) where each line has the format '<ts> " " <command> " " <content>', <ts> is a float, <command> is one of the valid commands, and <content> is any str


Cargando…
Cancelar
Guardar