xenapi: Pass string arguments to popen
The current BitTorrent code was passing integer arguments to `make_subprocess` which would in turn pass those to `popen`. This would cause a failure because the semantics of the underlying `execve` function is to only accept a list of strings. The solution is to cast the arguments to a string before passing them into `make_subrpocess`. Fixes bug 1201594 Change-Id: I8372795ca032420641c449cb07bb47f9252ff4ef
This commit is contained in:
@@ -169,9 +169,9 @@ def _seed(torrent_path, seed_cache_path, torrent_seed_duration,
|
||||
torrent_listen_port_start, torrent_listen_port_end):
|
||||
plugin_path = os.path.dirname(inspect.getabsfile(inspect.currentframe()))
|
||||
seeder_path = os.path.join(plugin_path, SEEDER_PROCESS)
|
||||
seed_cmd = [seeder_path, torrent_path, seed_cache_path,
|
||||
torrent_seed_duration, torrent_listen_port_start,
|
||||
torrent_listen_port_end]
|
||||
seed_cmd = map(str, [seeder_path, torrent_path, seed_cache_path,
|
||||
torrent_seed_duration, torrent_listen_port_start,
|
||||
torrent_listen_port_end])
|
||||
utils.run_command(seed_cmd)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user