mirror of https://github.com/docker/docker-py.git
Use constant for deprecation message in auth.py
This commit is contained in:
parent
33e1a58b60
commit
915be6ad67
|
|
@ -20,6 +20,7 @@ import warnings
|
|||
|
||||
import six
|
||||
|
||||
from .. import constants
|
||||
from .. import errors
|
||||
|
||||
INDEX_NAME = 'index.docker.io'
|
||||
|
|
@ -31,9 +32,9 @@ LEGACY_DOCKER_CONFIG_FILENAME = '.dockercfg'
|
|||
def resolve_repository_name(repo_name, insecure=False):
|
||||
if insecure:
|
||||
warnings.warn(
|
||||
'The `insecure` argument to resolve_repository_name() '
|
||||
'is deprecated and non-functional. Please remove it.',
|
||||
DeprecationWarning
|
||||
constants.INSECURE_REGISTRY_DEPRECATION_WARNING.format(
|
||||
'resolve_repository_name()'
|
||||
), DeprecationWarning
|
||||
)
|
||||
|
||||
if '://' in repo_name:
|
||||
|
|
|
|||
|
|
@ -268,9 +268,10 @@ class Client(clientbase.ClientBase):
|
|||
'filters': filters
|
||||
}
|
||||
|
||||
return self._stream_helper(self.get(self._url('/events'),
|
||||
params=params, stream=True),
|
||||
decode=decode)
|
||||
return self._stream_helper(
|
||||
self.get(self._url('/events'), params=params, stream=True),
|
||||
decode=decode
|
||||
)
|
||||
|
||||
def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False,
|
||||
privileged=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue