pvl.irk: update for pvl.irk/pvl.syslog.file changes
authorTero Marttila <terom@paivola.fi>
Sun, 13 Jan 2013 04:37:46 +0200
changeset 133 6365568b4a5a
parent 132 a54950a8e4ec
child 134 99a8987fc424
pvl.irk: update for pvl.irk/pvl.syslog.file changes
bin/pvl.irk
bin/pvl.irker-syslog
--- a/bin/pvl.irk	Sun Jan 13 03:48:36 2013 +0200
+++ b/bin/pvl.irk	Sun Jan 13 04:37:46 2013 +0200
@@ -52,10 +52,10 @@
     irker = pvl.irk.apply(options)
 
     log.info("Load targets...")
-    targets = [irker.target(target) for target in args]
+    targets = [irker[target] for target in args]
 
     log.info("Send messages...")
-    for line in pvl.syslog.tail.Tail(sys.stdin) :
+    for line in pvl.syslog.file.File(sys.stdin) :
         log.info("%s", line)
 
         for target in targets :
--- a/bin/pvl.irker-syslog	Sun Jan 13 03:48:36 2013 +0200
+++ b/bin/pvl.irker-syslog	Sun Jan 13 04:37:46 2013 +0200
@@ -123,6 +123,7 @@
     # customized mainloop that supports irker.irk
     while True :
         try :
+            # TODO: seprate IrkError, to not confuse irk write vs syslog read eof
             apply_syslog(options, syslog, rules, irker)
 
         except EOFError as ex :