summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-06-09 00:00:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-10 05:24:36 -0700
commitdbcb981892d922da61afa4bd9e3df9d22414e22a (patch)
tree68fb8ac0affae9acf89e04fbb20bc940210dd1d1 /extras
parent45cfee031062fe40899a6c4c9049d0267b7c7ee6 (diff)
Changes to volgen such that it does not error out in python2.4
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 988 (volgen in master generates error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=988
Diffstat (limited to 'extras')
-rw-r--r--extras/volgen/Common.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/extras/volgen/Common.py b/extras/volgen/Common.py
index 1042509..298dee9 100644
--- a/extras/volgen/Common.py
+++ b/extras/volgen/Common.py
@@ -74,7 +74,10 @@ def gfParser (volfile):
line = line.strip()
volfile_dict = {}
if re.match(r"[a-zA-Z0-9_]+", line):
- volfile_dict[line.split()[0]] = string.join (line.split()[1:], ' ') if line.split() > 1 else " "
+ if line.split() > 1:
+ volfile_dict[line.split()[0]] = string.join (line.split()[1:], ' ')
+ else:
+ volfile_dict[line.split()[0]] = " "
volume_array.append(volfile_dict)
return volume_array