Skip to content

Commit 3c63a62

Browse files
committed
Fix download function's keyword via ** keyword args
1 parent c54ac33 commit 3c63a62

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

frameioclient/lib/download.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
thread_local = threading.local()
2020

2121
class FrameioDownloader(object):
22-
def __init__(self, asset, download_folder, prefix, replace=False, checksum_verification=True, multi_part=False, concurrency=5):
22+
def __init__(self, asset, download_folder, prefix=None, replace=False, checksum_verification=True, multi_part=False, concurrency=5):
2323
self.multi_part = multi_part
2424
self.asset = asset
2525
self.asset_type = None
@@ -68,6 +68,7 @@ def _create_file_stub(self):
6868
return True
6969

7070
def _get_path(self):
71+
print("prefix:", self.prefix)
7172
if self.prefix != None:
7273
self.filename = self.prefix + self.filename
7374

frameioclient/service/assets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def upload(self, destination_id, filepath, asset=None):
260260

261261
return asset
262262

263-
def download(self, asset, download_folder, replace=False, checksum_verification=True, prefix=None, multi_part=False, concurrency=5):
263+
def download(self, asset, download_folder, **kwargs):
264264
"""
265265
Download an asset. The method will exit once the file is downloaded.
266266
@@ -272,5 +272,5 @@ def download(self, asset, download_folder, replace=False, checksum_verification=
272272
273273
client.assets.download(asset, "~./Downloads")
274274
"""
275-
downloader = FrameioDownloader(asset, download_folder, multi_part, concurrency, replace, prefix, checksum_verification)
275+
downloader = FrameioDownloader(asset, download_folder, **kwargs)
276276
return downloader.download_handler()

0 commit comments

Comments
 (0)