Commit 91e26348 authored by Jérome Perrin's avatar Jérome Perrin

patches/diff: emit DeprecationWarning only once

parent 9a2572db
......@@ -35,13 +35,9 @@ else:
try:
from deepdiff import DeepDiff
except ImportError:
DeepDiff = None
warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
DeprecationWarning)
try:
from deepdiff.helper import strings, numbers
except ImportError:
DeepDiff = None
strings = None
numbers = None
warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment