Skip to content

Commit 113901c

Browse files
committed
Prevent users from attempting to override 'version'
Signed-off-by: Aanand Prasad <[email protected]>
1 parent 41c2167 commit 113901c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ def create_container_from_config(self, config, name=None):
271271
def create_host_config(self, *args, **kwargs):
272272
if not kwargs:
273273
kwargs = {}
274+
if 'version' in kwargs:
275+
raise TypeError(
276+
"create_host_config() got an unexpected "
277+
"keyword argument 'version'"
278+
)
274279
kwargs['version'] = self._version
275280
return utils.create_host_config(*args, **kwargs)
276281

0 commit comments

Comments
 (0)