Skip to content

Commit

Permalink
Merge pull request #32 from ENCODE-DCC/dev
Browse files Browse the repository at this point in the history
v0.4.2
  • Loading branch information
leepc12 authored Nov 7, 2022
2 parents 46d9396 + 8afa71d commit 2c8942e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion autouri/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
from .s3uri import S3URI

__all__ = ["AbsPath", "AutoURI", "URIBase", "GCSURI", "HTTPURL", "S3URI"]
__version__ = "0.4.1"
__version__ = "0.4.2"
6 changes: 3 additions & 3 deletions autouri/gcsuri.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def _acquire(self):
elif u.read() == str_id:
self._lock_file_fd = id(self)

except (Forbidden, NotFound):
except Forbidden:
raise
except (ClientError, ValueError):
except (NotFound, ClientError, ValueError):
pass
return None

Expand All @@ -110,7 +110,7 @@ def _release(self):
try:
u.rm(no_lock=True, silent=True)
self._lock_file_fd = None
except ClientError:
except (ClientError, ValueError):
pass
return None

Expand Down
2 changes: 1 addition & 1 deletion autouri/s3uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _acquire(self):

except ClientError as e:
status = e.response["ResponseMetadata"]["HTTPStatusCode"]
if status in (403, 404):
if status in (403,):
raise
return None

Expand Down
6 changes: 3 additions & 3 deletions tests/test_race_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ def run_write_v6_txt(prefix, nth):

def test_race_cond_autouri_write_local(local_test_path):
prefix = os.path.join(local_test_path, "test_race_cond_autouri_write_local")
nth = 10
nth = 20
run_write_v6_txt(prefix, nth)


def test_race_cond_autouri_write_gcs(gcs_test_path):
prefix = os.path.join(gcs_test_path, "test_race_cond_autouri_write_gcs")
nth = 5
nth = 8
run_write_v6_txt(prefix, nth)


def test_race_cond_autouri_write_s3(s3_test_path):
nth = 3
nth = 5
prefix = os.path.join(s3_test_path, "test_race_cond_autouri_write_s3")
run_write_v6_txt(prefix, nth)

0 comments on commit 2c8942e

Please sign in to comment.