audeering / audfactory

Communicating with Artifactory
https://audeering.github.io/audfactory/
Other
0 stars 0 forks source link

Fix audfactory.versions() for missing permissions #21

Closed hagenw closed 3 years ago

hagenw commented 3 years ago

At the moment we are doing:

    if not path.exists():
        versions = []
    else:
        versions = [os.path.basename(str(p)) for p in path if p.is_dir]
        versions = [v for v in versions if audeer.is_semantic_version(v)]

The problem is that path.exists() raises a RuntimeError if you don't have the permissions to access that path. So I swtichted to use a try-except statement instead.

frankenjoe commented 3 years ago

Good, once released we can try to get rid of this commit I think: https://gitlab.audeering.com/tools/audb2/-/merge_requests/54/diffs?commit_id=12a7424b4cb87592b1114b320efa21db3af8f53c

codecov[bot] commented 3 years ago

Codecov Report

Merging #21 (0719bf2) into master (a817c71) will not change coverage. The diff coverage is 100.0%.

Impacted Files Coverage Δ
audfactory/core/api.py 100.0% <100.0%> (ø)