diff options
authorsrijan-sivakumar <>2020-09-16 08:55:22 +0530
committersrijan-sivakumar <>2020-09-16 09:01:53 +0530
commit5348292bf0fd79035b5817915922133cee8eb785 (patch)
parenta699974a698fdc15a5015dfe53b92055dc74dadd (diff) fails with UnicodeDecodeError
Issue: While decoding the byte characters the quota_fsck script stumbled across a corner case wherein the file names given by the getfattr dump will cause the decoding to UTF-8 to fail with UnicodeDecodeError. Code Change: On looking through the script, it seems like the file path is actually not needed when decoding for the xattr parsing, hence the code change reflects that. Also, removed a comparison which previously existed to skip the file names as that won't be required now. Fixes: #1487 Change-Id: I8a13ab07be6c9cfafae996f17764fbb4a285bd8c Signed-off-by: srijan-sivakumar <>
1 files changed, 2 insertions, 5 deletions
diff --git a/extras/quota/ b/extras/quota/
index ea8d638112b..e62f7fc52a3 100755
--- a/extras/quota/
+++ b/extras/quota/
@@ -156,13 +156,10 @@ def get_quota_xattr_brick(dpath):
xattr_dict = {}
xattr_dict['parents'] = {}
- for xattr in pairs:
+ for xattr in pairs[1:]:
xattr = xattr.decode("utf-8")
xattr_key = xattr.split("=")[0]
- if"# file:", xattr_key):
- # skip the file comment
- continue
- elif xattr_key is "":
+ if xattr_key == "":
# skip any empty lines
elif not"quota", xattr_key):