Skip to content

Commit

Permalink
MD5 hash and file size checks, improve clean_exit() (#11)
Browse files Browse the repository at this point in the history
* add sizeInBytes check if no md5 hash in xml

* if download error then exit with 1

* change to defaultdict; use double-quotes; add filename instead of org_name

* rank order: md5 > sizeInBytes

* ' --> "

* Default file size to None if not present in XML

* ' --> "

* Fix MD5 and sizeInBytes logic within is_broken()

- Messages to user about broken/missing MD5/size
information is only shown when downloading
those files
- MD5 match takes precedence over sizeInBytes (overrides bad size)
- sizeInBytes will be used if no MD5 present, but won't override bad MD5

* Streamline clean_exit()

- Leave choice to remove temp files to
user if interactive
- Don't remove temp if non-interactive
and there are failed files

* Fix final clean_exit() call

Co-authored-by: orangeSi <[email protected]>
  • Loading branch information
glarue and orangeSi authored Aug 15, 2021
1 parent e3c99c6 commit 0466e85
Showing 1 changed file with 128 additions and 80 deletions.
Loading

0 comments on commit 0466e85

Please sign in to comment.