summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-10-15 07:05:20 +0200
committerAnton Khirnov <anton@khirnov.net>2023-10-15 07:05:20 +0200
commit617ceee6766bd9459b9d938508ed8d52ca9674fd (patch)
treee6b560c149f019f2d20195d32f163a2103d08734
parent187248696e4398d00e703d97bdf8cd281bb79a05 (diff)
_mountinfo: add __repr__() to mounts
-rw-r--r--lbup/_mountinfo.py3
1 files changed, 3 insertions, 0 deletions
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,