jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
320 stars 74 forks source link

Use a named function when checking whether a path is remote. #93

Closed dHannasch closed 3 years ago

dHannasch commented 3 years ago

Ultimately I want to extend copytree to allow copying to local, but as a first step towards that, this moves out the check for a remote path to a named function.

codecov[bot] commented 3 years ago

Codecov Report

Merging #93 (01b7216) into master (9a141ec) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
- Coverage   98.84%   98.82%   -0.02%     
==========================================
  Files          23       23              
  Lines        4948     4950       +2     
==========================================
+ Hits         4891     4892       +1     
- Misses         57       58       +1     
Impacted Files Coverage Δ
smbclient/shutil.py 94.52% <100.00%> (+0.05%) :arrow_up:
smbprotocol/transport.py 97.82% <0.00%> (-1.09%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a141ec...01b7216. Read the comment docs.

dHannasch commented 3 years ago

Hmm. Codecov is reporting that this would somehow remove coverage for two error-condition lines in transport.py: https://app.codecov.io/gh/jborean93/smbprotocol/compare/93/changes

I have no earthly idea how that's possible.

jborean93 commented 3 years ago

Must be some race condition like effect where sometimes certain code paths are excised there but others times it does not. The transport stuff is weird so it doesn't surprise me too much.