Replace dotdict init by dict with init by kwargs.

master
voussoir 2021-05-08 09:26:10 -07:00
parent 450f42bca6
commit 9bdee227b3
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 12 additions and 10 deletions

View File

@ -301,11 +301,12 @@ def copy_dir(
if files_per_second is not None: if files_per_second is not None:
files_per_second.limit(1) files_per_second.limit(1)
results = dotdict.DotDict({ results = dotdict.DotDict(
'source': source, source=source,
'destination': destination, destination=destination,
'written_bytes': written_bytes, written_bytes=written_bytes,
}) default=None,
)
return results return results
def copy_file( def copy_file(
@ -415,11 +416,12 @@ def copy_file(
bytes_per_second = limiter_or_none(bytes_per_second) bytes_per_second = limiter_or_none(bytes_per_second)
results = dotdict.DotDict({ results = dotdict.DotDict(
'source': source, source=source,
'destination': destination, destination=destination,
'written_bytes': 0, written_bytes=0,
}, default=None) default=None,
)
# Determine overwrite # Determine overwrite
if destination.exists: if destination.exists: