(self)
The __init__-method.

        It just initializes some variables and settings and changes
        the working directory to /var/empty to prevent coredumps as
        normal user.
The __init__-method.
The __init__ - method .
def __init__(self):
        '''The __init__-method.

        It just initializes some variables and settings and changes
        the working directory to /var/empty to prevent coredumps as
        normal user.

        '''

        try:
            self.config_home = realpath(expanduser(getenv('XDG_CONFIG_HOME')))
        except:
            self.config_home = realpath(expanduser('~/.config'))
        finally:
            self.config_home = join(self.config_home, 'keepassc', 'config')

        try:
            self.data_home = realpath(expanduser(getenv('XDG_DATA_HOME')))
        except:
            self.data_home = realpath(expanduser('~/.local/share/'))
        finally:
            self.data_home = join(self.data_home, 'keepassc')
        self.last_home = join(self.data_home, 'last')
        self.remote_home = join(self.data_home, 'remote')
        self.key_home = join(self.data_home, 'key')

        self.config = parse_config(self)

        if self.config['rem_key'] is False and isfile(self.key_home):
            remove(self.key_home)

        self.initialize_cur()
        self.last_file = None
        self.last_key = None
        self.loginname = getpwuid(geteuid())[0]
        self.hostname = gethostname()
        self.cur_dir = getcwd()
        chdir('/var/empty')
        self.db = None
def __init__ ( self ) : try : self . config_home = realpath ( expanduser ( getenv ( 'XDG_CONFIG_HOME' ) ) ) except : self . config_home = realpath ( expanduser ( '~/.config' ) ) finally : self . config_home = join ( self . config_home , 'keepassc' , 'config' ) try : self . data_home = realpath ( expanduser ( getenv ( 'XDG_DATA_HOME' ) ) ) except : self . data_home = realpath ( expanduser ( '~/.local/share/' ) ) finally : self . data_home = join ( self . data_home , 'keepassc' ) self . last_home = join ( self . data_home , 'last' ) self . remote_home = join ( self . data_home , 'remote' ) self . key_home = join ( self . data_home , 'key' ) self . config = parse_config ( self ) if self . config [ 'rem_key' ] is False and isfile ( self . key_home ) : remove ( self . key_home ) self . initialize_cur ( ) self . last_file = None self . last_key = None self . loginname = getpwuid ( geteuid ( ) ) [ 0 ] self . hostname = gethostname ( ) self . cur_dir = getcwd ( ) chdir ( '/var/empty' ) self . db = None