X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fpython-systemd%2Fjournal.py;h=dd1f2299735673107eb090de0b0aa32ee870a830;hp=d0bcd24d1501aa8b800083259947c9320dd4ae36;hb=75e52a16f9ef476f1d18ec6d9c84e00149b80d03;hpb=affba8e90243526be673ad9f9b306a740b8824a6 diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py index d0bcd24d1..dd1f22997 100644 --- a/src/python-systemd/journal.py +++ b/src/python-systemd/journal.py @@ -293,7 +293,7 @@ class Reader(_Reader): monotonic = monotonic.totalseconds() monotonic = int(monotonic * 1000000) if isinstance(bootid, _uuid.UUID): - bootid = bootid.get_hex() + bootid = bootid.hex return super(Reader, self).seek_monotonic(monotonic, bootid) def log_level(self, level): @@ -314,7 +314,7 @@ class Reader(_Reader): Equivalent to add_match(MESSAGE_ID=`messageid`). """ if isinstance(messageid, _uuid.UUID): - messageid = messageid.get_hex() + messageid = messageid.hex self.add_match(MESSAGE_ID=messageid) def this_boot(self, bootid=None): @@ -346,12 +346,14 @@ class Reader(_Reader): def get_catalog(mid): if isinstance(mid, _uuid.UUID): - mid = mid.get_hex() + mid = mid.hex return _get_catalog(mid) def _make_line(field, value): if isinstance(value, bytes): return field.encode('utf-8') + b'=' + value + elif isinstance(value, int): + return field + '=' + str(value) else: return field + '=' + value