Skip to content

Commit

Permalink
Adding flag to assume no wild cards in the URL/filename
Browse files Browse the repository at this point in the history
  • Loading branch information
ericthewizard committed Jul 5, 2023
1 parent b442920 commit 61c01ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyspedas/utilities/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def download(remote_path='',
no_download=False,
last_version=False,
basic_auth=False,
regex=False):
regex=False,
no_wildcards=False):
"""
Download one or more remote files and return their local paths.
Expand Down Expand Up @@ -195,6 +196,9 @@ def download(remote_path='',
Flag to allow regular expressions in the file name matching,
instead of unix style matching
no_wildcards: bool
Flat to assume no wild cards in the requested url/filename
Returns:
String list specifying the full local path to all requested files
Expand Down Expand Up @@ -259,7 +263,7 @@ def download(remote_path='',

if not no_download:
# expand the wildcards in the url
if '?' in url or '*' in url or regex and no_download is False:
if ('?' in url or '*' in url or regex) and (not no_download and not no_wildcards):
if index_table.get(url_base) is not None:
links = index_table[url_base]
else:
Expand Down

0 comments on commit 61c01ee

Please sign in to comment.