Example #1
0
    def run(self):
        '''Run frontnend program
        
        Do common initialisation stuff common to all frontends,'''

        # Open configuration
        self.conf = Configuration()
        self.conf.open()
        # Open database
        try:
            self.openDatabase()
        except (EOFError, KeyboardInterrupt):
            print
            print "Good bye."
            sys.exit(1)
        if not self.pdb.native:
            # Do backup
            backupfile = self.pdb.default_db_filename + '.kedpm.bak'
            self.showMessage(
                """WARNING! KedPM has detected original FPM password database.
Backing it up to %s
""" % backupfile)
            copyfile(self.pdb.default_db_filename, backupfile)

        self.mainLoop()
Example #2
0
 def setUp(self):
     self.conf = Configuration()
     self.conf.filename = "test/sample_config.xml"
     self.conf.open()