PEATSA/WebApp/Data.py
def exists(self):
		
		'''Returns True if data corresponding to the receiver exists in the database'''
		
		retval = True
		
		#Check the job entry exists in the database
		try:
			self.connection.commit()
		except Exception, data:
			print 'Caught exception', Exception, 'when attempting db commit'
			print 'Reason:', data
			print 'Attempting reconnect'
			self.connection.ping()
				
		query = "SELECT * FROM %s WHERE JobID = '%s'" % (self.jobTable, self.identification)
		self.cursor.execute(query)
		rows = self.cursor.fetchall()

		if len(rows) == 0:
			retval = False
		
		return retval
Returns True if data corresponding to the receiver exists in the database
Returns True if data corresponding to the receiver exists in the database
Returns True if data corresponding to the receiver exists in the database
def exists(self):
		retval = True
		try:
			self.connection.commit()
		except Exception, data:
			print 'Caught exception', Exception, 'when attempting db commit'
			print 'Reason:', data
			print 'Attempting reconnect'
			self.connection.ping()
		query = "SELECT * FROM %s WHERE JobID = '%s'" % (self.jobTable, self.identification)
		self.cursor.execute(query)
		rows = self.cursor.fetchall()
		if len(rows) == 0:
			retval = False
		return retval
def exists ( self ) : retval = True try : self . connection . commit ( ) except Exception , data : print 'Caught exception' , Exception , 'when attempting db commit' print 'Reason:' , data print 'Attempting reconnect' self . connection . ping ( ) query = "SELECT * FROM %s WHERE JobID = '%s'" % ( self . jobTable , self . identification ) self . cursor . execute ( query ) rows = self . cursor . fetchall ( ) if len ( rows ) == 0 : retval = False return retval
Returns True if data corresponding to the receiver exists in the database
Returns True if data corresponding to the receiver exists in the database
'''Returns True if data corresponding to the receiver exists in the database''' #Check the job entry exists in the database
self