# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
"export PYTHONPATH=${{PWD}}; " +
". ${{PWD}}/env/bin/activate; " +
"resources/traffic_scripts/{} {}") \
.format(Constants.REMOTE_FW_DIR, script_file_name,
script_args)
"export PYTHONPATH=${{PWD}}; " +
". ${{PWD}}/env/bin/activate; " +
"resources/traffic_scripts/{} {}") \
.format(Constants.REMOTE_FW_DIR, script_file_name,
script_args)
- (ret_code, stdout, stderr) = ssh.exec_command_sudo(
- 'sh -c "{}"'.format(TrafficScriptExecutor._escape(cmd)),
+ ret_code, stdout, stderr = ssh.exec_command_sudo(
+ 'sh -c "{cmd}"'.format(cmd=TrafficScriptExecutor._escape(cmd)),