mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 16:14:16 +00:00
linting
This commit is contained in:
@@ -290,9 +290,9 @@ class Updater:
|
|||||||
cpied_cnt = 0
|
cpied_cnt = 0
|
||||||
try:
|
try:
|
||||||
ign_func = self._ignore(ignores)
|
ign_func = self._ignore(ignores)
|
||||||
cpied_cnt= copytree_with_ign(exist, new,
|
cpied_cnt = copytree_with_ign(exist, new,
|
||||||
ignore_func=ign_func,
|
ignore_func=ign_func,
|
||||||
debug=self.debug)
|
debug=self.debug)
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
msg = f'error copying dir {exist}'
|
msg = f'error copying dir {exist}'
|
||||||
self.log.err(f'{msg}: {exc}')
|
self.log.err(f'{msg}: {exc}')
|
||||||
|
|||||||
@@ -356,12 +356,17 @@ def copytree_with_ign(src, dst, ignore_func=None, debug=False):
|
|||||||
LOG.dbg(f'mkdir \"{dstf}\"',
|
LOG.dbg(f'mkdir \"{dstf}\"',
|
||||||
force=True)
|
force=True)
|
||||||
os.makedirs(dstf, exist_ok=True)
|
os.makedirs(dstf, exist_ok=True)
|
||||||
copied_count += copytree_with_ign(srcf, dstf, ignore_func=ignore_func)
|
copied_count += copytree_with_ign(srcf,
|
||||||
|
dstf,
|
||||||
|
ignore_func=ignore_func)
|
||||||
else:
|
else:
|
||||||
if debug:
|
if debug:
|
||||||
LOG.dbg(f'copytree, copy file \"{src}\" to \"{dst}\"',
|
LOG.dbg(f'copytree, copy file \"{src}\" to \"{dst}\"',
|
||||||
force=True)
|
force=True)
|
||||||
copied_count += _cp(srcf, dstf, ignore_func=ignore_func, debug=debug)
|
copied_count += _cp(srcf,
|
||||||
|
dstf,
|
||||||
|
ignore_func=ignore_func,
|
||||||
|
debug=debug)
|
||||||
return copied_count
|
return copied_count
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user