From 1cbde27ed30993d0339eb68f6987b32299ffe9bc Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 31 May 2020 10:42:49 +0200 Subject: [PATCH] fix indentation --- dotdrop/dotdrop.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index 3923ecb..3af210f 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -426,20 +426,12 @@ def cmd_importer(o): if o.dry: LOG.dry('would copy {} to {}'.format(dst, srcf)) else: - if os.path.isdir(dst): - if os.path.exists(srcf): - shutil.rmtree(srcf) - shutil.copytree(dst, srcf) - else: - shutil.copy2(dst, srcf) - if o.dry: - LOG.dry('would run: {}'.format(' '.join(cmd))) - else: - r, _ = run(cmd, raw=False, debug=o.debug, checkerr=True) - if not r: - LOG.err('importing \"{}\" failed!'.format(path)) - ret = False - continue + if os.path.isdir(dst): + if os.path.exists(srcf): + shutil.rmtree(srcf) + shutil.copytree(dst, srcf) + else: + shutil.copy2(dst, srcf) retconf = o.conf.new(src, dst, linktype) if retconf: LOG.sub('\"{}\" imported'.format(path))