Replace dotdict init by dict with init by kwargs.

This commit is contained in:
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

View file

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