Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit 83ea6a1

Browse files
committed
use proper deprecation warning from python std lib \cc @matusvalo
1 parent 2855fb6 commit 83ea6a1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

consul/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import abc
22
import collections
3+
import warnings
34
import logging
45
import base64
56
import shlex
@@ -57,7 +58,8 @@ def script(klass, args, interval):
5758
"""
5859
if isinstance(args, six.string_types) \
5960
or isinstance(args, six.binary_type):
60-
log.warn("DEPRECATED: Check.script should take a list of args")
61+
warnings.warn(
62+
"Check.script should take a list of args", DeprecationWarning)
6163
args = shlex.split(args)
6264
return {'args': args, 'interval': interval}
6365

0 commit comments

Comments
 (0)