def deleteSiteInfo(self, site):
 try:
  q = SiteDB.query.filter((SiteDB.sitename == site)).first()
 except Exception as e:
  Log.debug(self, '{0}'.format(e))
  Log.error(self, 'Unable to query database')
 if (not q):
  Log.error(self, '{0} does not exist in database'.format(site))
 try:
  db_session.delete(q)
  db_session.commit()
 except Exception as e:
  Log.debug(self, '{0}'.format(e))
  Log.error(self, 'Unable to delete site from application database.')

def deleteSiteInfo ( self , site ) : try : q = SiteDB . query . filter ( ( SiteDB . sitename == site ) ) . first ( ) except Exception as e : Log . debug ( self , '{0}' . format ( e ) ) Log . error ( self , 'Unable to query database' ) if ( not q ) : Log . error ( self , '{0} does not exist in database' . format ( site ) ) try : db_session . delete ( q ) db_session . commit ( ) except Exception as e : Log . debug ( self , '{0}' . format ( e ) ) Log . error ( self , 'Unable to delete site from application database.' )
delete site record in database .