Browse Source

make CALookup iterable

failed_true
Edoardo Putti 8 years ago
parent
commit
a546e8bf44
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      ca_manager.py

+ 5
- 0
ca_manager.py View File

@ -185,6 +185,11 @@ class CALookup(object):
self.ssl_ca_dir = ssl_ca_dir self.ssl_ca_dir = ssl_ca_dir
def __iter__(self): def __iter__(self):
c = self.conn.cursor()
c.execute("""SELECT id, name, type FROM cas""")
return iter(c.fetchall())
def __delitem__(self, ca_id): def __delitem__(self, ca_id):
""" """


Loading…
Cancel
Save