<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lookup_mac(self, ip):
 		"""Look up a lease object with given ip address and return the 		associated mac address. 		@type ip: str 		@rtype: str or None 		@raises ValueError: 		@raises OmapiError: 		@raises OmapiErrorNotFound: if no lease object with the given ip could be found 		@raises OmapiErrorAttributeNotFound: if lease could be found, but objects lacks a mac 		@raises socket.error: 		"""

		res = self.lookup_by_lease(ip=ip)
		try:
			return res["hardware-address"]
		except KeyError:
			raise OmapiErrorAttributeNotFound()