Changeset 1598 for trunk/packages/invirt-remote-server/python
- Timestamp:
- Nov 10, 2008, 3:20:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-remote-server/python/remote/bcast.py
r1597 r1598 10 10 """ 11 11 pipes = [(host, 12 Popen(['remctl', host, 'remote', 'web', cmd], stdout=PIPE ))12 Popen(['remctl', host, 'remote', 'web', cmd], stdout=PIPE, stderr=PIPE)) 13 13 for host in hosts] 14 outputs = [(s, p.communicate()[0]) for (s, p) in pipes]14 outputs = dict((s, p.communicate()) for (s, p) in pipes) 15 15 for (s, p) in pipes: 16 16 if p.returncode != 0: 17 raise RuntimeError("remctl to host %s returned non-zero exit status %d" 18 % (s, p.returncode)) 19 return [(s, yaml.load(o, yaml.CSafeLoader)) for (s, o) in outputs] 17 if outputs[s][1].startswith('remctl: cannot connect to %s' % s): 18 del outputs[s] 19 else: 20 raise RuntimeError("remctl to host %s returned non-zero exit status %d" 21 % (s, p.returncode)) 22 return [(s, yaml.load(o[1], yaml.CSafeLoader)) for (s, o) in outputs.iteritems()]
Note: See TracChangeset
for help on using the changeset viewer.