From e6f8a378b19f2a1023f0e5d7f60dfae8afde05e0 Mon Sep 17 00:00:00 2001 From: "fabrizio.benedetti.82" Date: Tue, 9 Mar 2010 16:44:29 +0000 Subject: [PATCH] Corrected a bug for the command txt when it is invoked with an unvalid plot to export. --- hooke_cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hooke_cli.py b/hooke_cli.py index 6804acf..00699be 100755 --- a/hooke_cli.py +++ b/hooke_cli.py @@ -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)): -- 2.26.2