From: <bar...@us...> - 2009-10-01 09:01:54
|
Revision: 206 http://mevislabmodules.svn.sourceforge.net/mevislabmodules/?rev=206&view=rev Author: bartdedobbelaer Date: 2009-10-01 09:01:44 +0000 (Thu, 01 Oct 2009) Log Message: ----------- - Allow multiple pre- and post commands (delimited by ;) Modified Paths: -------------- trunk/Community/General/Modules/Macros/WinSCP/WinSCP.py Modified: trunk/Community/General/Modules/Macros/WinSCP/WinSCP.py =================================================================== --- trunk/Community/General/Modules/Macros/WinSCP/WinSCP.py 2009-09-04 14:30:33 UTC (rev 205) +++ trunk/Community/General/Modules/Macros/WinSCP/WinSCP.py 2009-10-01 09:01:44 UTC (rev 206) @@ -42,13 +42,15 @@ winsources.append(MLABFileManager.nativePath(source)) script = _getScript() - preCommand = ctx.field("preCommand").stringValue() - if preCommand: - script += preCommand + "\n" + commands = ctx.field("preCommand").stringValue().split(";") + for command in commands: + if command: + script += command + "\n" script += "put \"" + "\" \"".join(winsources) + "\" \"" + target + "\"\n" - postCommand = ctx.field("postCommand").stringValue() - if postCommand: - script += postCommand + "\n" + commands = ctx.field("postCommand").stringValue().split(";") + for command in commands: + if command: + script += command + "\n" script += "close\nexit\n" _executeScript(script) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |