Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# FIXME python2
from __future__ import absolute_import, unicode_literals
from future.utils import python_2_unicode_compatible
from lxml.builder import E
from lxml.etree import Element, _Element
from lxml.objectify import ObjectifiedElement
import pykeepass.entry
from pykeepass.baseelement import BaseElement
# FIXME python2
@python_2_unicode_compatible
class Group(BaseElement):
def __init__(self, name=None, element=None, icon=None, notes=None,
kp=None, expires=None, expiry_time=None):
self._kp = kp
if element is None:
super(Group, self).__init__(
element=Element('Group'),
kp=kp,
expires=expires,
expiry_time=expiry_time,
icon=icon
)
self._element.append(E.Name(name))
if notes:
logger = logging.getLogger(__name__)
reserved_keys = [
'Title',
'UserName',
'Password',
'URL',
'Tags',
'IconID',
'Times',
'History',
'Notes'
]
# FIXME python2
@python_2_unicode_compatible
class Entry(BaseElement):
def __init__(self, title=None, username=None, password=None, url=None,
notes=None, tags=None, expires=False, expiry_time=None,
icon=None, autotype_sequence=None, autotype_enabled=True,
element=None, kp=None):
self._kp = kp
if element is None:
super(Entry, self).__init__(
element=Element('Entry'),
kp=kp,
expires=expires,
expiry_time=expiry_time,
icon=icon
)