Skip to content

Commit e276c1c

Browse files
authored
Merge pull request syslog-ng#5137 from HofiOne/fix-s3-dest-python-ver-issue
s3: use python3.9 compatible glob()
2 parents f29eeda + e15fb69 commit e276c1c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/python-modules/syslogng/modules/s3/s3_destination.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
deps_installed = False
3333

3434
from concurrent.futures import ThreadPoolExecutor
35-
from glob import glob
3635
from logging import getLogger
3736
from pathlib import Path
3837
from signal import signal, SIGINT, SIG_IGN
@@ -182,8 +181,7 @@ def generate_persist_name(options: Dict[str, Any]) -> str:
182181
return f"s3({','.join([options['url'], options['bucket'], str(options['object_key'])])})"
183182

184183
def __load_persist(self) -> None:
185-
for path_str in glob(pathname="*.json", root_dir=self.working_dir):
186-
path = Path(self.working_dir, path_str)
184+
for path in Path(self.working_dir).glob("*.json"):
187185
try:
188186
persist = S3ObjectPersist.load(path=path)
189187
except PersistLoadError:

0 commit comments

Comments
 (0)