From 96637e2d12170ae59e02079210572660f6b1f885 Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Wed, 7 Jun 2023 11:05:10 +0900 Subject: [PATCH] fixed bug to output redandant sub_folders/files array list. --- mdrsclient/commands/ls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdrsclient/commands/ls.py b/mdrsclient/commands/ls.py index e4fa4cf..e653f4a 100644 --- a/mdrsclient/commands/ls.py +++ b/mdrsclient/commands/ls.py @@ -161,10 +161,10 @@ class LsCommand(BaseCommand): except UnauthorizedException: pass else: - data["sub_folders"] = ( - list(map(lambda x: self._folder2dict(x), sorted(folder.sub_folders, key=lambda x: x.name))), + data["sub_folders"] = list( + map(lambda x: self._folder2dict(x), sorted(folder.sub_folders, key=lambda x: x.name)) ) - data["files"] = (list(map(lambda x: self._file2dict(x), sorted(folder.files, key=lambda x: x.name))),) + data["files"] = list(map(lambda x: self._file2dict(x), sorted(folder.files, key=lambda x: x.name))) return data def _file2dict(self, file: File) -> dict: