Skip to content

Commit 583f1a9

Browse files
committed
systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3. https://bugs.freedesktop.org/show_bug.cgi?id=77086
1 parent f7cf47e commit 583f1a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

systemd/journal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def seek_monotonic(self, monotonic, bootid=None):
293293
monotonic = monotonic.totalseconds()
294294
monotonic = int(monotonic * 1000000)
295295
if isinstance(bootid, _uuid.UUID):
296-
bootid = bootid.get_hex()
296+
bootid = bootid.hex
297297
return super(Reader, self).seek_monotonic(monotonic, bootid)
298298

299299
def log_level(self, level):
@@ -314,7 +314,7 @@ def messageid_match(self, messageid):
314314
Equivalent to add_match(MESSAGE_ID=`messageid`).
315315
"""
316316
if isinstance(messageid, _uuid.UUID):
317-
messageid = messageid.get_hex()
317+
messageid = messageid.hex
318318
self.add_match(MESSAGE_ID=messageid)
319319

320320
def this_boot(self, bootid=None):
@@ -346,7 +346,7 @@ def this_machine(self, machineid=None):
346346

347347
def get_catalog(mid):
348348
if isinstance(mid, _uuid.UUID):
349-
mid = mid.get_hex()
349+
mid = mid.hex
350350
return _get_catalog(mid)
351351

352352
def _make_line(field, value):

0 commit comments

Comments
 (0)