This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
################# | |
# Configuration # | |
################# | |
# TODO: à migrer dans un fichier de config ? | |
# Clé privée principale, utilisée pour générer la CSR | |
private_master_key="/etc/ssl/private/slaanesh.org.key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Theoretical exercises in patterns to make API changes smoother | |
from functools import wraps | |
def deprecated_in_favor_of(new_name): | |
def wrap(f): | |
@wraps(f) | |
def wrapped_f(*args, **kwargs): | |
if not wrapped_f._called: | |
print(f.__name__ + ' deprecated in favor of ' + new_name) |