From eb4fc374b83b693ac767587452a8d63aca77675f Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Tue, 17 Sep 2024 18:45:14 +0000 Subject: [PATCH] use endswith to clean up scripting (#2862) --- ush/python/pygfs/jedi/jedi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/python/pygfs/jedi/jedi.py b/ush/python/pygfs/jedi/jedi.py index 08cfbc02af..61ad820302 100644 --- a/ush/python/pygfs/jedi/jedi.py +++ b/ush/python/pygfs/jedi/jedi.py @@ -251,7 +251,7 @@ def extract_tar(self, task_config: AttrDict, tar_dict) -> Dict[str, Any]: # extract bias correction files from tar file for tar_file in tar_dict['copy']: - if ".tar" in tar_file[1]: + if tar_file[1].endswith('.tar'): try: with tarfile.open(tar_file[1], "r") as tarball: tarball.extractall(path=os.path.join(task_config.DATA, 'obs'))