Skip to content

Commit 6b579f2

Browse files
committed
properly use warning
Signed-off-by: Tim van Katwijk <[email protected]>
1 parent 545ed0a commit 6b579f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: dockerfile_parse/parser.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import logging
1212
import os
1313
import re
14+
import warnings
1415
from contextlib import contextmanager
1516
from shlex import quote
1617

@@ -867,7 +868,7 @@ def image_from(from_value):
867868
:param from_value: string like "image:tag" or "image:tag AS name"
868869
:return: tuple of the image and stage name, e.g. ("image:tag", None)
869870
"""
870-
DeprecationWarning("Use image_name_from instead.")
871+
warnings.warn("Use image_name_from instead.", DeprecationWarning)
871872
image, name = image_name_from(from_value)
872873
return str(image) if image else None, name
873874

0 commit comments

Comments
 (0)