Skip to content

Commit

Permalink
Merge pull request #15 from clonker/fix_minor
Browse files Browse the repository at this point in the history
fix yaml loader deprecation warning (#13)
  • Loading branch information
cwehmeyer authored Feb 17, 2021
2 parents 0e8f402 + b421778 commit c587961
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mdshare/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def search(filename_pattern, repository=None):
"""Returns a list of available files matching a filename_pattern.
Arguments:
filname_pattern (str): filename pattern, allows for Unix shell-style wildcards
filename_pattern (str): filename pattern, allows for Unix shell-style wildcards
repository (Repository): repository object
"""
if repository is None:
Expand Down
4 changes: 2 additions & 2 deletions mdshare/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from humanfriendly import format_size
from yaml import load
from yaml import safe_load
import requests
import fnmatch
from .utils import LoadError, file_hash
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(self, catalogue_file, checksum_file=None):
'Checksums do not match, check your catalogue files!')
self.catalogue_file = catalogue_file
with open(self.catalogue_file, 'r') as fh:
data = load(fh)
data = safe_load(fh)
for key in ('url', 'index', 'containers'):
if key not in data:
raise RuntimeError(
Expand Down
4 changes: 2 additions & 2 deletions mdshare/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def download_file(repository, file, local_path, callback=None):
Arguments:
repository (Repository): repository object
file (str): name of the file in the repository
local_filename (str): local path where the file should be saved
local_path (str): local path where the file should be saved
callback (callable): callback function
"""
location, metadata = repository.lookup(file)
Expand Down Expand Up @@ -101,7 +101,7 @@ def attempt_to_download_file(
Arguments:
repository (Repository): repository object
file (str): name of the file in the repository
local_filename (str): local path where the file should be saved
local_path (str): local path where the file should be saved
max_attempts (int): number of download attempts
callback (callable): callback function
"""
Expand Down

0 comments on commit c587961

Please sign in to comment.