Skip to content

Commit

Permalink
s3: use python3.9 compatible glob()
Browse files Browse the repository at this point in the history
  • Loading branch information
HofiOne authored and MrAnno committed Sep 26, 2024
1 parent 811b33f commit ac6a434
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/python-modules/syslogng/modules/s3/s3_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
deps_installed = False

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

def __load_persist(self) -> None:
for path_str in glob(pathname="*.json", root_dir=self.working_dir):
path = Path(self.working_dir, path_str)
for path in Path(self.working_dir).glob("*.json"):
try:
persist = S3ObjectPersist.load(path=path)
except PersistLoadError:
Expand Down

0 comments on commit ac6a434

Please sign in to comment.