def __init__(self, parser=None): """ Init class to manage parse argument """ Server.__init__(self, parser) self.rest_method = "ecriture" self.database = (DBEcriture,) self.tag = None self.tag_id = None self.cache_categorie = None if self.attribut.has_key('tag'): self.tag = self.attribut['tag'] del self.attribut['tag'] if self.options.cmd == 'list' and \ not self.filter.has_key('compte_id'): print "-f compte_id=<id> is mandatory" sys.exit(1) if self.options.cmd == 'create' and \ not self.attribut.has_key('compte_id'): print "-a compte_id=<id> is mandatory" sys.exit(1)
def __init__(self, parser=None): """ Init class to manage parse argument """ Server.__init__(self, parser) self.rest_method = "tag" self.database = (DBTag,)
def __init__(self, parser=None): """ Init class to manage parse argument """ Server.__init__(self, parser) self.rest_method = "categorie" self.database = (DBCategorie,)