Whamcloud - gitweb
- more careful error checking
authorrread <rread>
Mon, 26 Aug 2002 23:44:36 +0000 (23:44 +0000)
committerrread <rread>
Mon, 26 Aug 2002 23:44:36 +0000 (23:44 +0000)
lustre/utils/lconf
lustre/utils/lmc

index 65eaada..3b997f1 100755 (executable)
@@ -839,14 +839,18 @@ def getDevice(obd):
     return dev.firstChild.data, size
 
 # Get the text content from the first matching child
+# If there is no content (or it is all whitespace), return
+# the default
 def getText(node, tag, default=""):
     list = node.getElementsByTagName(tag)
     if len(list) > 0:
         node = list[0]
         node.normalize()
-        return node.firstChild.data
-    else:
-        return default
+        if node.firstChild:
+            txt = string.strip(node.firstChild.data)
+            if txt:
+                return txt
+    return default
 
 def get_ost_net(node, uuid):
     ost = lookup(node, uuid)
@@ -1146,7 +1150,7 @@ def main():
 if __name__ == "__main__":
     try:
         main()
-    except LConfError, e:
+    except LconfError, e:
         print e
     except CommandError, e:
         e.dump()
index 66f046a..b103a0e 100755 (executable)
@@ -59,14 +59,14 @@ Commands:
    Nettype is either tcp, elan, or gm.
    Requires a node argument
 
---lov lov_name [mdc_name stripe_sz stripe_off pattern]
-   Creates a logical volume
-   When used with other commands, it specifics the lov to modify
-
 --mds device [size]
    Create a MDS using the device
    Requires --node 
 
+--lov lov_name [mdc_name stripe_sz stripe_off pattern]
+   Creates a logical volume
+   When used with other commands, it specifics the lov to modify
+
 --mdc mdc_name
    Configures a MDC for a node.
    Requires --node 
@@ -78,7 +78,7 @@ Commands:
    Requires --node
    If --lov lov_name is used, this device is added to lov. 
 
---mtpt /mnt/point mdc_name lov_name|osc_name 
+--mtpt /mnt/point mds_name lov_name|osc_name 
    Creates a client mount point.
    Requires --node