Project

General

Profile

Actions

Bug #39404

closed

cephfs-shell: fix string decode for ls command

Added by Milind Changire about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
% Done:

100%

Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

CephFS:~/>>> ls -l
startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
File "/home/mchangir/work/mchangir-ceph.git/src/tools/cephfs/cephfs-shell", line 376, in onecmd
res = Cmd.onecmd(self, line)
File "/usr/lib/python3.7/site-packages/cmd2.py", line 2672, in onecmd
stop = func(statement)
File "/usr/lib/python3.7/site-packages/cmd2.py", line 496, in cmd_wrapper
return func(instance, args)
File "/home/mchangir/work/mchangir-ceph.git/src/tools/cephfs/cephfs-shell", line 717, in do_ls
items = [i for i in items if not i.d_name.startswith('.')]
File "/home/mchangir/work/mchangir-ceph.git/src/tools/cephfs/cephfs-shell", line 717, in <listcomp>
items = [i for i in items if not i.d_name.startswith('.')]
TypeError: startswith first arg must be bytes or a tuple of bytes, not str


Related issues 2 (0 open2 closed)

Has duplicate CephFS - Bug #39617: cephfs-shell dumps backtrace on "ls"DuplicateVarsha Rao

Actions
Copied to CephFS - Backport #39678: nautilus: cephfs-shell: fix string decode for ls commandResolvedPatrick DonnellyActions
Actions

Also available in: Atom PDF