I haven't looked into this too closely, but it seems that Android's
getgr* fill gr_passwd with a null pointer, mapped to python None, which
is not a bytes.
Since this assert seems to be 100% py3 sanity-checking and bup doesn't
actually use the gr_passwd anywhere, it should be safe to pass the None.
Signed-off-by: Muh Muhten <
muh.m...@gmail.com>
---
lib/bup/pwdgrp.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bup/pwdgrp.py b/lib/bup/pwdgrp.py
index a41c442..3dc45c9 100644
--- a/lib/bup/pwdgrp.py
+++ b/lib/bup/pwdgrp.py
@@ -37,7 +37,7 @@ class Group:
__slots__ = 'gr_name', 'gr_passwd', 'gr_gid', 'gr_mem'
def __init__(self, name, passwd, gid, mem):
assert isinstance(name, bytes)
- assert isinstance(passwd, bytes)
+ assert isinstance(passwd, bytes) or passwd is None
for m in mem:
assert isinstance(m, bytes)
self.gr_name, self.gr_passwd, self.gr_gid, self.gr_mem = \
--
2.36.1