(self)
Method is necessary to prevent weird effects due to theading
Method is necessary to prevent weird effects due to theading
Method is necessary to prevent weird effects due to theading
def pre_lock(self):
        '''Method is necessary to prevent weird effects due to theading'''

        if self.db.filepath is None and self.remote is False:
            self.control.draw_text(self.changed,
                                   (1, 0, 'Can only lock an existing db!'),
                                   (4, 0, 'Press any key.'))
            if self.control.any_key() == -1:
                self.close()
            return False
        if ((self.changed is True and self.db.read_only is False) and
            self.remote is False):
            self.state = 2
            self.control.draw_text(self.changed,
                                   (1, 0, 'File has changed. Save? [(y)/n]'))
        else:
            self.lock_db()
def pre_lock ( self ) : if self . db . filepath is None and self . remote is False : self . control . draw_text ( self . changed , ( 1 , 0 , 'Can only lock an existing db!' ) , ( 4 , 0 , 'Press any key.' ) ) if self . control . any_key ( ) == - 1 : self . close ( ) return False if ( ( self . changed is True and self . db . read_only is False ) and self . remote is False ) : self . state = 2 self . control . draw_text ( self . changed , ( 1 , 0 , 'File has changed. Save? [(y)/n]' ) ) else : self . lock_db ( )