From 83512537f8f72912386611488eb39437001e050e Mon Sep 17 00:00:00 2001
From: wu_xinjun <bent20140204@outlook.com>
Date: 星期二, 15 三月 2022 14:56:22 +0800
Subject: [PATCH] add feature [process mutiFrame bin file]:
---
src/utils/tools.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/utils/tools.py b/src/utils/tools.py
index ee2f8de..3db661f 100644
--- a/src/utils/tools.py
+++ b/src/utils/tools.py
@@ -2,7 +2,7 @@
import numpy as np
import time
-def file_fliter(folder:str, file_ext:str, sort_format):
+def file_fliter(folder:str, file_ext:str, sort_format = None):
files_List = os.listdir(folder)
target_files = []
@@ -11,8 +11,10 @@
for file in files_List:
if file.split('.')[-1] == file_ext:
target_files.append(file)
- # sort the list by the sort_format
- target_files.sort(key=sort_format)
+
+ if sort_format is not None:
+ # sort the list by the sort_format
+ target_files.sort(key=sort_format)
return target_files
--
Gitblit v1.9.1