X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fcommand.py;h=1cb58e7d6d2262a07e8d62cf74f4c3b4fe47fc71;hb=e57b7150dee76d42fc15f9477a3045e5171c8878;hp=063caab92801cf1bbe7ead3d7c2a01ca36abba9e;hpb=9cf2ea3dec0af93b86a2c413de3ea47b682c939a;p=sfa.git diff --git a/sfatables/command.py b/sfatables/command.py index 063caab9..1cb58e7d 100644 --- a/sfatables/command.py +++ b/sfatables/command.py @@ -3,16 +3,24 @@ import os, time class Command: options = [] help = '' - key='' + type='command' matches = False targets = False + action = 'store_const' def __init__(self): + self.options = [] + self.help = '' + self.type = 'command' + self.matches = False + self.targets = False + self.action = 'store_const' + return - def call(self): + def call(self, coptions, moptions, toptions): # Override this function return True - def __call__(self, option, opt_str, value, parser, *args, **kwargs): - return self.call(option) + def __call__(self, coptions, moptions, toptions): + return self.call(coptions,moptions,toptions)