mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 05:39:43 +00:00
trans_r and trans_w are not list anymore
This commit is contained in:
@@ -545,17 +545,17 @@ def apply_trans(dotpath, dotfile, debug=False):
|
||||
"""
|
||||
src = dotfile.src
|
||||
new_src = '{}.{}'.format(src, TRANS_SUFFIX)
|
||||
for trans in dotfile.trans_r:
|
||||
if debug:
|
||||
LOG.dbg('executing transformation {}'.format(trans))
|
||||
s = os.path.join(dotpath, src)
|
||||
temp = os.path.join(dotpath, new_src)
|
||||
if not trans.transform(s, temp):
|
||||
msg = 'transformation \"{}\" failed for {}'
|
||||
LOG.err(msg.format(trans.key, dotfile.key))
|
||||
if new_src and os.path.exists(new_src):
|
||||
remove(new_src)
|
||||
return None
|
||||
trans = dotfile.trans_r
|
||||
if debug:
|
||||
LOG.dbg('executing transformation {}'.format(trans))
|
||||
s = os.path.join(dotpath, src)
|
||||
temp = os.path.join(dotpath, new_src)
|
||||
if not trans.transform(s, temp):
|
||||
msg = 'transformation \"{}\" failed for {}'
|
||||
LOG.err(msg.format(trans.key, dotfile.key))
|
||||
if new_src and os.path.exists(new_src):
|
||||
remove(new_src)
|
||||
return None
|
||||
return new_src
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user