Page MenuHomeSoftware Heritage

Split _check_preconditions_on into _check_file_length and _check_file_md5sum.
ClosedPublic

Authored by vlorentz on Nov 19 2020, 10:37 AM.

Details

Summary

they are better function names IMO.

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4518 (id=16019)

Could not rebase; Attempt merge onto bacbc29731...

Updating bacbc297..0e72920b
Fast-forward
 swh/deposit/api/common.py | 60 ++++++++++++++++++++++++++++-------------------
 1 file changed, 36 insertions(+), 24 deletions(-)
Changes applied before test
commit 0e72920bb8bba285abd2f201aa934a626824b681
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 19 10:37:34 2020 +0100

    Split _check_preconditions_on into _check_file_length and _check_file_md5sum.
    
    they are better function names IMO.

commit 43edd9039f23a5ff449897ba7ff4c59ac3868197
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Nov 18 16:31:09 2020 +0100

    Remove duplicate type annotations.
    
    They are already in the signature.

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/382/ for more details.

ardumont added inline comments.
swh/deposit/api/common.py
593

why not both checks as before.

one question inline but otherwise fine.

This revision is now accepted and ready to land.Nov 19 2020, 11:59 AM
swh/deposit/api/common.py
593

because it didn't check both before. content_length was None, so it was not checked.