Browse Source

transform ca_path getter to property

failed_true
Edoardo Putti 8 years ago
parent
commit
7dbfe9fec6
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      ca_manager.py

+ 6
- 4
ca_manager.py View File

@ -46,18 +46,20 @@ class CAManager(object):
def db_path(self):
return os.path.join(self.path, 'ca_manager.db')
def _get_ssh_cas_dir(self):
@property
def ssh_ca_dir(self):
return os.path.join(self.path, 'ssh_cas')
def _get_ssh_ca_path(self, ca_id):
cas_dir = self._get_ssh_cas_dir()
cas_dir = self.ssh_ca_dir
return os.path.join(cas_dir, ca_id)
def _get_ssl_cas_dir(self):
@property
def ssl_ca_dir(self):
return os.path.join(self.path, 'ssl_cas')
def _get_ssl_ca_path(self, ca_id):
cas_dir = self._get_ssl_cas_dir()
cas_dir = self.ssl_ca_dir
return os.path.join(cas_dir, ca_id)
def create_ssh_ca(self, ca_id, ca_name):


Loading…
Cancel
Save