From 617ceee6766bd9459b9d938508ed8d52ca9674fd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 15 Oct 2023 07:05:20 +0200 Subject: _mountinfo: add __repr__() to mounts --- lbup/_mountinfo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lbup/_mountinfo.py b/lbup/_mountinfo.py index 973e135..bbced58 100644 --- a/lbup/_mountinfo.py +++ b/lbup/_mountinfo.py @@ -92,6 +92,9 @@ class _MountEntry: if len(remainder) > 0: self.super_opts = remainder.pop(0) + def __repr__(self): + return self.raw_entry.decode('ascii', errors = 'backslashreplace') + def __str__(self): return '({major}:{minor}){src}{root}->{mp}'.format( major = self.devnum >> 8, minor = self.devnum & 255, -- cgit v1.2.3