Beispiel #1
0
 def establish_new_connection(self):
     self.LOGGER.info(f'Attempting to establish a new connection')
     try:
         connection = connection_handler.establish_connection()
         self.cnx = connection[0]
         self.cursor = connection[1]
     except Exception as e:
         self.LOGGER.debug(f'Failed to establish connection: {e}')
Beispiel #2
0
    def update_latest_interaction_s(person):
        connection = connection_handler.establish_connection()
        cnx = connection[0]
        cursor = connection[1]
        try:
            cursor.execute(
                queries.update_interaction(person.first_name,
                                           person.last_name))
        except Exception as e:
            print("Exception has occured 212: " + str(e))

        cnx.commit()
        cursor.close()
        cnx.close()
Beispiel #3
0
 def establish_new_connection(self):
     connection = connection_handler.establish_connection()
     self.cnx = connection[0]
     self.cursor = connection[1]
Beispiel #4
0
 def begin_program(self):
     self.cursor = connection_handler.establish_connection()
     self.get_user_input()