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
|
import six
|
||||||
|
|
||||||
|
from .. import constants
|
||||||
from .. import errors
|
from .. import errors
|
||||||
|
|
||||||
INDEX_NAME = 'index.docker.io'
|
INDEX_NAME = 'index.docker.io'
|
||||||
|
|
@ -31,9 +32,9 @@ LEGACY_DOCKER_CONFIG_FILENAME = '.dockercfg'
|
||||||
def resolve_repository_name(repo_name, insecure=False):
|
def resolve_repository_name(repo_name, insecure=False):
|
||||||
if insecure:
|
if insecure:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'The `insecure` argument to resolve_repository_name() '
|
constants.INSECURE_REGISTRY_DEPRECATION_WARNING.format(
|
||||||
'is deprecated and non-functional. Please remove it.',
|
'resolve_repository_name()'
|
||||||
DeprecationWarning
|
), DeprecationWarning
|
||||||
)
|
)
|
||||||
|
|
||||||
if '://' in repo_name:
|
if '://' in repo_name:
|
||||||
|
|
|
||||||
|
|
@ -268,9 +268,10 @@ class Client(clientbase.ClientBase):
|
||||||
'filters': filters
|
'filters': filters
|
||||||
}
|
}
|
||||||
|
|
||||||
return self._stream_helper(self.get(self._url('/events'),
|
return self._stream_helper(
|
||||||
params=params, stream=True),
|
self.get(self._url('/events'), params=params, stream=True),
|
||||||
decode=decode)
|
decode=decode
|
||||||
|
)
|
||||||
|
|
||||||
def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False,
|
def exec_create(self, container, cmd, stdout=True, stderr=True, tty=False,
|
||||||
privileged=False):
|
privileged=False):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue