X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Fplugin%2Fcurve.py;h=931dca3e69ef6e033da4d034ea28467c32263ec2;hp=d58d6605b4e94a623c7e8b29148e8d886edab81e;hb=2acea22a3782a3f108a1c65f98a0eb36afdceb9e;hpb=4639f6fecd0de4d5dbff75a2d9cc8d10f4d13aaa 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)