]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: Print max_bytes and max_files as string on get Quota
authorVarsha Rao <varao@redhat.com>
Thu, 10 Oct 2019 10:19:53 +0000 (15:49 +0530)
committerVarsha Rao <varao@redhat.com>
Sat, 28 Dec 2019 12:25:40 +0000 (17:55 +0530)
Signed-off-by: Varsha Rao <varao@redhat.com>
src/tools/cephfs/cephfs-shell

index 177dd65356215afd6d4ac516ead0a1cf152d62ed..ac7a0851597d738a649cb93a73f67125992eed2a 100755 (executable)
@@ -1281,18 +1281,16 @@ class CephFSShell(Cmd):
             max_bytes = '0'
             max_files = '0'
             try:
-                max_bytes = cephfs.getxattr(args.path,
-                                            'ceph.quota.max_bytes')
-                poutput('max_bytes: %s' % max_bytes)
+                max_bytes = cephfs.getxattr(args.path, 'ceph.quota.max_bytes')
+                poutput('max_bytes: {}'.format(max_bytes.decode('utf-8')))
             except libcephfs.Error:
                 perror('max_bytes is not set')
                 self.exit_code = 1
                 pass
 
             try:
-                max_files = cephfs.getxattr(args.path,
-                                            'ceph.quota.max_files')
-                poutput('max_files: %s' % max_files)
+                max_files = cephfs.getxattr(args.path, 'ceph.quota.max_files')
+                poutput('max_files: {}'.format(max_files.decode('utf-8')))
             except libcephfs.Error:
                 perror('max_files is not set')
                 self.exit_code = 1