Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Nov 13, 2023
1 parent da25bfd commit 2712eb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dotdrop/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def _merge_dirs_create_left_only(self, diff, left, right,
cpied_cnt = 0
try:
ign_func = self._ignore(ignores)
cpied_cnt= copytree_with_ign(exist, new,
ignore_func=ign_func,
debug=self.debug)
cpied_cnt = copytree_with_ign(exist, new,
ignore_func=ign_func,
debug=self.debug)
except OSError as exc:
msg = f'error copying dir {exist}'
self.log.err(f'{msg}: {exc}')
Expand Down
9 changes: 7 additions & 2 deletions dotdrop/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,17 @@ def copytree_with_ign(src, dst, ignore_func=None, debug=False):
LOG.dbg(f'mkdir \"{dstf}\"',
force=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:
if debug:
LOG.dbg(f'copytree, copy file \"{src}\" to \"{dst}\"',
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


Expand Down

0 comments on commit 2712eb5

Please sign in to comment.