Skip to content

Commit

Permalink
properly use warning
Browse files Browse the repository at this point in the history
Signed-off-by: Tim van Katwijk <[email protected]>
  • Loading branch information
tim-vk committed Jan 6, 2023
1 parent 545ed0a commit 6b579f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dockerfile_parse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import logging
import os
import re
import warnings
from contextlib import contextmanager
from shlex import quote

Expand Down Expand Up @@ -867,7 +868,7 @@ def image_from(from_value):
:param from_value: string like "image:tag" or "image:tag AS name"
:return: tuple of the image and stage name, e.g. ("image:tag", None)
"""
DeprecationWarning("Use image_name_from instead.")
warnings.warn("Use image_name_from instead.", DeprecationWarning)
image, name = image_name_from(from_value)
return str(image) if image else None, name

Expand Down

0 comments on commit 6b579f2

Please sign in to comment.