Skip to content

Commit

Permalink
Merge pull request #2703 from aiordache/cleanup_before_release
Browse files Browse the repository at this point in the history
Fix docs typo and `port_bindings` check
  • Loading branch information
aiordache authored Nov 19, 2020
2 parents d83a2ad + db9af44 commit 27e3fa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/models/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def run(self, image, command=None, stdout=True, stderr=False,
to a single container port. For example,
``{'1111/tcp': [1234, 4567]}``.
Imcompatible with ``host`` in ``network_mode``.
Incompatible with ``host`` network mode.
privileged (bool): Give extended privileges to this container.
publish_all_ports (bool): Publish all ports to the host.
read_only (bool): Mount the container's root filesystem as read
Expand Down
4 changes: 2 additions & 2 deletions docker/types/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def __init__(self, version, binds=None, port_bindings=None,
if dns_search:
self['DnsSearch'] = dns_search

if network_mode is 'host' and port_bindings is not None:
if network_mode is 'host' and port_bindings:
raise host_config_incompatible_error(
'network_mode', 'host', 'port_bindings'
)
Expand Down Expand Up @@ -670,7 +670,7 @@ def host_config_value_error(param, param_value):


def host_config_incompatible_error(param, param_value, incompatible_param):
error_msg = 'Incompatible {1} in {0} is not compatible with {2}'
error_msg = '\"{1}\" {0} is incompatible with {2}'
return errors.InvalidArgument(
error_msg.format(param, param_value, incompatible_param)
)
Expand Down

0 comments on commit 27e3fa3

Please sign in to comment.