From: fabrizio.benedetti.82 Date: Tue, 9 Mar 2010 16:44:29 +0000 (+0000) Subject: Corrected a bug for the command txt when it is invoked with an unvalid plot to export. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=351558cf719566dbac190f5bca60607528dc7026;p=hooke.git Corrected a bug for the command txt when it is invoked with an unvalid plot to export. --- 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)):