Skip to content

Commit 52ef4d1

Browse files
TheRealFalconholmanb
authored andcommitted
chore: silence crypt warnings
It has already been worked around, so the warning is useless
1 parent 402ae54 commit 52ef4d1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloudinit/sources/DataSourceAzure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import os.path
1212
import re
1313
import socket
14+
import warnings
1415
import xml.etree.ElementTree as ET # nosec B405
1516
from enum import Enum
1617
from pathlib import Path
@@ -50,7 +51,9 @@
5051
from cloudinit.url_helper import UrlError
5152

5253
try:
53-
import crypt # pylint: disable=W4901
54+
with warnings.catch_warnings():
55+
warnings.simplefilter("ignore", category=DeprecationWarning)
56+
import crypt # pylint: disable=W4901
5457

5558
blowfish_hash: Any = functools.partial(
5659
crypt.crypt, salt=f"$6${util.rand_str(strlen=16)}"

0 commit comments

Comments
 (0)