Replace dotdict init by dict with init by kwargs.
This commit is contained in:
parent
450f42bca6
commit
9bdee227b3
1 changed files with 12 additions and 10 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue