<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def queryOne(self, query, args=None):
 		""" 		Execute the passed in query against the database. 		Uses a Generator & fetchone to reduce your process memory size. 		 		@param query: MySQL Query to execute. %s or %(key)s will be replaced by parameter args sequence 		@param args: Sequence of value to replace in your query. A mapping may also be used but your query must use %(key)s 		@author: Nick Verbeck 		@since: 5/12/2008 		"""

		
		self.affectedRows = None
		self.lastError = None
		cursor = None
		try:
			try:
				self._GetConnection()
				self.conn.query = query
				#Execute query
				cursor = self.conn.getCursor()
				self.affectedRows = cursor.execute(query, args)
				self.conn.updateCheckTime()
				while 1:
					row = cursor.fetchone()
					if row is None:
						break
					else:
						self.record = row
						yield row
						
				self.rowcount = cursor.rowcount
			except Exception, e:
				self.lastError = e
				self.affectedRows = None
		finally:
			if cursor is not None:
				cursor.close()
			self._ReturnConnection()
			if self.lastError is not None:
				raise self.lastError
			else:
				raise StopIteration