Skip to content

Commit d52b83c

Browse files
committed
rename function names
1 parent 0b4cbe3 commit d52b83c

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

strato/backends/_aws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def delete(self, filenames, profile, quiet, dryrun):
101101
if not dryrun:
102102
check_call(subcall_args)
103103

104-
def stat(self, filename, profile):
104+
def exists(self, filename, profile):
105105
assert filename.startswith("s3://"), "Must be an S3 URI!"
106106

107107
call_args = self._call_prefix.copy()

strato/backends/_gcp.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ def __init__(self):
1111
"gcloud",
1212
"storage",
1313
"--no-user-output-enabled",
14-
# "-o",
15-
# "GSUtil:parallel_composite_upload_threshold=150M",
1614
]
1715

1816
def copy(self, recursive, ionice, filenames, quiet, dryrun):
@@ -63,7 +61,7 @@ def delete(self, recursive, filenames, quiet, dryrun):
6361
if not dryrun:
6462
check_call(call_args)
6563

66-
def stat(self, filename):
64+
def exists(self, filename):
6765
assert filename.startswith("gs://"), "Must be a GS URI!"
6866
call_args = ["gcloud", "storage", "ls", filename]
6967
check_call(call_args, stdout=DEVNULL)

strato/backends/_local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import glob
33
import shutil
44
from pathlib import Path
5-
from subprocess import check_call
5+
from subprocess import check_call, DEVNULL
66

77

88
class LocalBackend:
@@ -86,4 +86,4 @@ def delete(self, recursive, filenames, quiet, dryrun):
8686

8787
def stat(self, filename):
8888
call_args = ["stat", filename]
89-
check_call(call_args)
89+
check_call(call_args, stdout=DEVNULL)

strato/commands/exists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ def check_status(filename, profile):
1717
from strato.backends import AWSBackend
1818

1919
be = AWSBackend()
20-
be.stat(filename, profile)
20+
be.exists(filename, profile)
2121
elif backend == "gcp":
2222
from strato.backends import GCPBackend
2323

2424
be = GCPBackend()
25-
be.stat(filename)
25+
be.exists(filename)
2626
else:
2727
from strato.backends import LocalBackend
2828

0 commit comments

Comments
 (0)