fixed problem when condition was empty
This commit is contained in:
parent
f2729255f8
commit
a994b4bcc9
|
@ -44,7 +44,7 @@ parser.add_option('-c','--condition', dest='condition', type='string', \
|
||||||
|
|
||||||
parser.set_defaults(whitelist = [])
|
parser.set_defaults(whitelist = [])
|
||||||
parser.set_defaults(blacklist = [])
|
parser.set_defaults(blacklist = [])
|
||||||
parser.set_defaults(condition = '')
|
parser.set_defaults(condition = 'True')
|
||||||
|
|
||||||
(options,filenames) = parser.parse_args()
|
(options,filenames) = parser.parse_args()
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ for file in files:
|
||||||
|
|
||||||
specials['_row_'] += 1 # count row
|
specials['_row_'] += 1 # count row
|
||||||
|
|
||||||
if eval(eval(evaluator)): # valid row ?
|
if options.condition != '' and eval(eval(evaluator)): # valid row ?
|
||||||
table.data = [table.data[position] for position in positions] # retain filtered columns
|
table.data = [table.data[position] for position in positions] # retain filtered columns
|
||||||
table.data_write() # output processed line
|
table.data_write() # output processed line
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue