git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
425cb14
)
Be a bit more robust to poorly defined codemux attribute values
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 13 Aug 2009 16:17:15 +0000
(16:17 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 13 Aug 2009 16:17:15 +0000
(16:17 +0000)
plugins/codemux.py
patch
|
blob
|
history
diff --git
a/plugins/codemux.py
b/plugins/codemux.py
index
3852aa2
..
fa5311f
100644
(file)
--- a/
plugins/codemux.py
+++ b/
plugins/codemux.py
@@
-40,8
+40,11
@@
def GetSlivers(data, config, plc = None):
for attribute in sliver['attributes']:
if attribute['tagname'] == 'codemux':
# add to conf. Attribute is [host, port]
for attribute in sliver['attributes']:
if attribute['tagname'] == 'codemux':
# add to conf. Attribute is [host, port]
- params = {'host': attribute['value'].split(",")[0],
- 'port': attribute['value'].split(",")[1]}
+ parts = attribute['value'].split(",")
+ if len(parts)<2:
+ logger.log("codemux: attribute value (%s) for codemux not separated by comma. Skipping."%attribute['value'])
+ continue
+ params = {'host': parts[0], 'port': parts[1]}
try:
# Check to see if sliver is running. If not, continue
if vserver.VServer(sliver['name']).is_running():
try:
# Check to see if sliver is running. If not, continue
if vserver.VServer(sliver['name']).is_running():