Browse Source

make authority a peewee model for persistence

master
Edoardo Putti 8 years ago
parent
commit
c9dda72307
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      models/authority.py

+ 5
- 4
models/authority.py View File

@ -12,12 +12,13 @@ __doc__= """
Module of classes to handle certificate requests Module of classes to handle certificate requests
""" """
class Authority(object):
class Authority(Model):
request_allowed = [] request_allowed = []
def __init__(self, ca_id, ca_dir = MANAGER_PATH):
self.ca_id = ca_id
self.ca_dir = ca_dir
# data stored in the database
ca_id = CharField()
name = CharField()
serial = IntegerField()
def __bool__(self): def __bool__(self):
return os.path.exists(self.path) return os.path.exists(self.path)


Loading…
Cancel
Save