mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
change to remove to many conditionals
This commit is contained in:
parent
378929579f
commit
b63d75f2bb
@ -65,18 +65,20 @@ def run():
|
||||
c = client.Command()
|
||||
cmdstr = ' '.join(args[:-1])
|
||||
cmdstr = 'rsync -av --info=progress2 ' + cmdstr
|
||||
if options.loginname and options.substitutename:
|
||||
cmdstr += ' {}@'.format(options.loginname) + '{node}' + '{}:'.format(options.substitutename) + targpath
|
||||
elif options.loginname and not options.substitutename:
|
||||
cmdstr += ' {}@'.format(options.loginname) + '{node}:' + targpath
|
||||
elif options.substitutename and not options.loginname:
|
||||
subname = options.substitutename
|
||||
if '{' not in subname:
|
||||
cmdstr += ' {node}' + '{}:'.format(subname) + targpath
|
||||
else:
|
||||
cmdstr += ' {}:'.format(subname) + targpath
|
||||
|
||||
targname = options.substitutename
|
||||
if targname and '{' in targname:
|
||||
targname = targname + ':'
|
||||
elif targname:
|
||||
targname = '{node}' + targname + ':'
|
||||
else:
|
||||
cmdstr += ' {node}:' + targpath
|
||||
targname = '{node}:'
|
||||
|
||||
if options.loginname:
|
||||
cmdstr += ' {}@'.format(options.loginname) + targname + targpath
|
||||
else:
|
||||
cmdstr += ' {}'.format(targname) + targpath
|
||||
|
||||
|
||||
currprocs = 0
|
||||
all = set([])
|
||||
|
Loading…
Reference in New Issue
Block a user