summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/auth/auth.py7
-rw-r--r--docker/client.py7
2 files changed, 8 insertions, 6 deletions
diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 7c4876a..56c42ec 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -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:
diff --git a/docker/client.py b/docker/client.py
index 285718b..9084689 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -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):