Skip to content

Instantly share code, notes, and snippets.

View Kl0ven's full-sized avatar
🐺

Jean-Loup MONNIER Kl0ven

🐺
View GitHub Profile
flowchart LR
%% Style
classDef roadmap fill:#f96,color:#000,stroke:#000
classDef inProgress fill:#5BFF33,color:#000,stroke:#000
classDef subState fill:#65DCDF,color:#000,stroke:#000
subgraph Legend
direction LR
legendp{{Person}}
legendRoadmapl1[[RoadMap L1]]:::roadmap
@Kl0ven
Kl0ven / if any print any
Last active December 7, 2020 12:52
[Python snippets provisionning labs] #python
def if_any_raise_any(dict, base_dict, base_dict_name):
if any(v is None for v in dict.values()):
msg = "{} key(s) are missing from {}, {}: {}".format(
','.join(k for k, v in dict.items() if v is None), base_dict_name, base_dict_name, base_dict)
logger.error(msg)
raise KeyError(msg)