PEATSA/WebApp/Data.py
def error(self):
	
		'''If there was an error during the job returns a dictionary detailing the error, otherwise returns None
		
		The dictionary has two keys:
			ErrorDescription - A short description of the type of error
			DetailedDescription - A longer description of what went wrong'''
	
		if self.exists():
			self.connection.commit()
			statement = """SELECT Error, ErrorDescription, DetailedDescription FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification)
			self.cursor.execute(statement)
			rows = self.cursor.fetchall()
			if bool(rows[0][0]) == False:
				return None
			else:
				return dict(zip(['ErrorDescription', 'DetailedDescription'], rows[0][1:]))
		else:
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification
If there was an error during the job returns a dictionary detailing the error, otherwise returns None
		
		The dictionary has two keys:
			ErrorDescription - A short description of the type of error
			DetailedDescription - A longer description of what went wrong
If there was an error during the job returns a dictionary detailing the error, otherwise returns None
The dictionary has two keys:
ErrorDescription - A short description of the type of error
DetailedDescription - A longer description of what went wrong
If there was an error during the job returns a dictionary detailing the error otherwise returns None The dictionary has two keys : ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong
def error(self):
		if self.exists():
			self.connection.commit()
			statement = """SELECT Error, ErrorDescription, DetailedDescription FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification)
			self.cursor.execute(statement)
			rows = self.cursor.fetchall()
			if bool(rows[0][0]) == False:
				return None
			else:
				return dict(zip(['ErrorDescription', 'DetailedDescription'], rows[0][1:]))
		else:
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification
def error ( self ) : if self . exists ( ) : self . connection . commit ( ) statement = """SELECT Error, ErrorDescription, DetailedDescription FROM %s WHERE JobID='%s' """ % ( self . jobTable , self . identification ) self . cursor . execute ( statement ) rows = self . cursor . fetchall ( ) if bool ( rows [ 0 ] [ 0 ] ) == False : return None else : return dict ( zip ( [ 'ErrorDescription' , 'DetailedDescription' ] , rows [ 0 ] [ 1 : ] ) ) else : raise Exceptions . DatabaseRetrievalError , "Job Id %s does not exist in the database" % self . identification
If there was an error during the job returns a dictionary detailing the error, otherwise returns None
The dictionary has two keys:
ErrorDescription - A short description of the type of error
DetailedDescription - A longer description of what went wrong
If there was an error during the job returns a dictionary detailing the error otherwise returns None The dictionary has two keys : ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong
'''If there was an error during the job returns a dictionary detailing the error, otherwise returns None
		
		The dictionary has two keys:
			ErrorDescription - A short description of the type of error
			DetailedDescription - A longer description of what went wrong'''
self