Skip to content

Commit bf2ea4d

Browse files
committed
Rename name parameter in pull method to repository
for consistency with APIClient naming Signed-off-by: Joffrey F <[email protected]>
1 parent 82e57a4 commit bf2ea4d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docker/models/images.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def load(self, data):
266266

267267
return [self.get(i) for i in images]
268268

269-
def pull(self, name, tag=None, **kwargs):
269+
def pull(self, repository, tag=None, **kwargs):
270270
"""
271271
Pull an image of the given name and return it. Similar to the
272272
``docker pull`` command.
@@ -280,7 +280,6 @@ def pull(self, name, tag=None, **kwargs):
280280
Args:
281281
name (str): The repository to pull
282282
tag (str): The tag to pull
283-
insecure_registry (bool): Use an insecure registry
284283
auth_config (dict): Override the credentials that
285284
:py:meth:`~docker.client.DockerClient.login` has set for
286285
this request. ``auth_config`` should contain the ``username``
@@ -305,12 +304,12 @@ def pull(self, name, tag=None, **kwargs):
305304
>>> images = client.images.pull('busybox')
306305
"""
307306
if not tag:
308-
name, tag = parse_repository_tag(name)
307+
repository, tag = parse_repository_tag(repository)
309308

310-
self.client.api.pull(name, tag=tag, **kwargs)
309+
self.client.api.pull(repository, tag=tag, **kwargs)
311310
if tag:
312-
return self.get('{0}:{1}'.format(name, tag))
313-
return self.list(name)
311+
return self.get('{0}:{1}'.format(repository, tag))
312+
return self.list(repository)
314313

315314
def push(self, repository, tag=None, **kwargs):
316315
return self.client.api.push(repository, tag=tag, **kwargs)

0 commit comments

Comments
 (0)