mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 12:44:15 +00:00
fix indentation
This commit is contained in:
@@ -426,20 +426,12 @@ def cmd_importer(o):
|
|||||||
if o.dry:
|
if o.dry:
|
||||||
LOG.dry('would copy {} to {}'.format(dst, srcf))
|
LOG.dry('would copy {} to {}'.format(dst, srcf))
|
||||||
else:
|
else:
|
||||||
if os.path.isdir(dst):
|
if os.path.isdir(dst):
|
||||||
if os.path.exists(srcf):
|
if os.path.exists(srcf):
|
||||||
shutil.rmtree(srcf)
|
shutil.rmtree(srcf)
|
||||||
shutil.copytree(dst, srcf)
|
shutil.copytree(dst, srcf)
|
||||||
else:
|
else:
|
||||||
shutil.copy2(dst, srcf)
|
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
|
|
||||||
retconf = o.conf.new(src, dst, linktype)
|
retconf = o.conf.new(src, dst, linktype)
|
||||||
if retconf:
|
if retconf:
|
||||||
LOG.sub('\"{}\" imported'.format(path))
|
LOG.sub('\"{}\" imported'.format(path))
|
||||||
|
|||||||
Reference in New Issue
Block a user