import requests


def check_pwn(email):
	"""Takes a string (email address) as input and checks whether the email
	address is contained within a breach registered in the Haveibeenpwnd database.

	If the request is empty or generates any other errors, nothing is returned.
	This is done to make it testable whether an email address hasn't been pwnd.

	Otherwise the result is a JSON structure of pwnd information.
	"""
	headers = {'api-version': '2', 'User-Agent': 'Pwnbak-checker-Linux'}
	req = requests.get("https://haveibeenpwned.com/api/v2/breachedaccount/%s" % email, headers=headers)
	
	try:
		return req.json()
	except:
		return