Skip to content

Commit

Permalink
skip validation if md5sum is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed Jul 30, 2021
1 parent 79f704b commit 6fa8937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hub/dataload/sources/pubchem/pubchem_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def post_dump(self, *args, **kwargs):
'''Validate downloaded files'''
self.logger.debug("Start validating downloaded files...")
cmd = shutil.which('md5sum')
if not cmd:
raise OSError('"md5sum" is not found in the PATH!')
if cmd:
old = os.path.abspath(os.curdir)
os.chdir(self.new_data_folder)
Expand All @@ -81,3 +79,5 @@ def post_dump(self, *args, **kwargs):
self.logger.debug("All %s files are validated.", len(md5_files))
finally:
os.chdir(old)
else:
self.logger.warning('"md5sum" is not found in the PATH! File validation is skipped.')

0 comments on commit 6fa8937

Please sign in to comment.