Corrected a bug for the command txt when it is invoked with an unvalid plot to export.
authorfabrizio.benedetti.82 <devnull@localhost>
Tue, 9 Mar 2010 16:44:29 +0000 (16:44 +0000)
committerfabrizio.benedetti.82 <devnull@localhost>
Tue, 9 Mar 2010 16:44:29 +0000 (16:44 +0000)
hooke_cli.py

index 6804acf55515ab7c0bee9a818280ff368903a51a..00699be39156cae0cd4f5061b31b144808fcdc89 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 '''
 hooke_cli.py
@@ -680,7 +681,13 @@ Syntax: txt [filename] {plot to export}
                 whichplot=int(args[1])
             except:
                 pass
-            
+
+       try:
+            outofplot=self.plots[whichplot].vectors
+        except:
+            print "Plot index out of range."
+           return 0
+
         columns=[]     
         for dataset in self.plots[whichplot].vectors:
             for i in range(0,len(dataset)):