From 2acea22a3782a3f108a1c65f98a0eb36afdceb9e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Aug 2010 16:11:12 -0400 Subject: [PATCH] Added command_stack option to all' default. --- hooke/plugin/curve.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hooke/plugin/curve.py b/hooke/plugin/curve.py index d58d660..931dca3 100644 --- a/hooke/plugin/curve.py +++ b/hooke/plugin/curve.py @@ -285,8 +285,8 @@ class InfoCommand (CurveCommand): Argument(name='all', type='bool', default=False, count=1, help='Get all curve information.'), ] - self.fields = ['name', 'path', 'experiment', 'driver', 'filetype', 'note', - 'blocks', 'block sizes'] + self.fields = ['name', 'path', 'experiment', 'driver', 'filetype', + 'note', 'command stack', 'blocks', 'block sizes'] for field in self.fields: args.append(Argument( name=field, type='bool', default=False, count=1, @@ -300,7 +300,7 @@ class InfoCommand (CurveCommand): fields = {} for key in self.fields: fields[key] = params[key] - if reduce(lambda x,y: x and y, fields.values()) == False: + if reduce(lambda x,y: x or y, fields.values()) == False: params['all'] = True # No specific fields set, default to 'all' if params['all'] == True: for key in self.fields: @@ -330,6 +330,9 @@ class InfoCommand (CurveCommand): def _get_note(self, curve): return curve.info.get('note', None) + def _get_command_stack(self, curve): + return curve.command_stack + def _get_blocks(self, curve): return len(curve.data) -- 2.26.2