summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorsrijan-sivakumar <ssivakum@redhat.com>2020-07-28 22:27:34 +0530
committerSunny Kumar <sunkumar@redhat.com>2020-08-19 09:00:56 +0000
commit6f855121cd5b4178239c3eb6a844ae7fececd354 (patch)
tree39e95a81afd432d9c52b0ea9bb2b0655538f4b16 /extras
parent7c309928591deb8d0188793677958226ac03897a (diff)
Quota quota_fsck.py, converting byte string to string
Issue: The quota_fsck.py script throws an TypeError due to the fact that the data is read as bytes and then the string operations are applied on the. Now, in python3 string is unicode and hence we get the type error. Code Changes: Decoding the bytes value into utf-8 format. Change-Id: Ia1ff52a821d664a371c8166692ff506ae39f6e40 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com> Fixes: #1401
Diffstat (limited to 'extras')
-rwxr-xr-xextras/quota/quota_fsck.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/extras/quota/quota_fsck.py b/extras/quota/quota_fsck.py
index 174f2a2a44c..ea8d638112b 100755
--- a/extras/quota/quota_fsck.py
+++ b/extras/quota/quota_fsck.py
@@ -157,6 +157,7 @@ def get_quota_xattr_brick(dpath):
xattr_dict['parents'] = {}
for xattr in pairs:
+ xattr = xattr.decode("utf-8")
xattr_key = xattr.split("=")[0]
if re.search("# file:", xattr_key):
# skip the file comment