chiark / gitweb /
systemd-python: _reader now takes unix timestamp in seconds
[elogind.git] / src / python-systemd / journal.py
index 46affcee00c6226f74a8b1cab38e5244bd8475b5..ab8661e987343f636f3fcd5351b72fe86120cd74 100644 (file)
@@ -113,7 +113,8 @@ class Journal(_Journal):
     def add_match(self, *args, **kwargs):
         args = list(args)
         args.extend(_make_line(key, val) for key, val in kwargs.items())
-        super(Journal, self).add_match(*args)
+        for arg in args:
+            super(Journal, self).add_match(arg)
 
     def get_next(self, skip=1):
         return self._convert_entry(
@@ -125,7 +126,7 @@ class Journal(_Journal):
 
     def seek_realtime(self, timestamp):
         if isinstance(timestamp, datetime.datetime):
-            timestamp = int(timestamp.strftime("%s%f"))
+            timestamp = float(timestamp.strftime("%s.%f"))
         return super(Journal, self).seek_realtime(timestamp)
 
     def seek_monotonic(self, timestamp, bootid=None):