File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -241,16 +241,15 @@ def remote(cls):
241
241
remote = RemoteS3 (None , {"url" : cls .get_url ()})
242
242
yield remote
243
243
244
- @classmethod
245
- def put_objects (cls , remote , objects ):
244
+ @staticmethod
245
+ def put_objects (remote , objects ):
246
246
s3 = remote .s3
247
247
bucket = remote .path_info .bucket
248
248
s3 .create_bucket (Bucket = bucket )
249
249
for key , body in objects .items ():
250
250
s3 .put_object (
251
251
Bucket = bucket , Key = (remote .path_info / key ).path , Body = body
252
252
)
253
- yield
254
253
255
254
256
255
class GCP :
@@ -263,13 +262,12 @@ def remote(cls):
263
262
remote = RemoteGS (None , {"url" : cls .get_url ()})
264
263
yield remote
265
264
266
- @classmethod
267
- def put_objects (cls , remote , objects ):
265
+ @staticmethod
266
+ def put_objects (remote , objects ):
268
267
client = remote .gs
269
268
bucket = client .get_bucket (remote .path_info .bucket )
270
269
for key , body in objects .items ():
271
270
bucket .blob ((remote .path_info / key ).path ).upload_from_string (body )
272
- yield
273
271
274
272
275
273
class Azure :
You can’t perform that action at this time.
0 commit comments