Skip to content

Instantly share code, notes, and snippets.

@thealphadollar
Last active March 26, 2019 15:21
Show Gist options
  • Save thealphadollar/683a97668efaec8805feb82c1fa8421a to your computer and use it in GitHub Desktop.
Save thealphadollar/683a97668efaec8805feb82c1fa8421a to your computer and use it in GitHub Desktop.
A better test for testing inform_mailing_list function.
class KeyFileNotFound(IOError):
def __init__(self, key_file_path):
traceback.print_exc()
LOG.error("Error: secret key not found. Create it with:")
if not os.path.isdir(os.path.dirname(key_file_path)):
print('mkdir -p', os.path.dirname(key_file_path))
LOG.error('head -c 24 /dev/urandom >', key_file_path)
sys.exit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment