Skip to content

Commit

Permalink
Merge pull request docker#1670 from docker/2.4.1-release
Browse files Browse the repository at this point in the history
2.4.1 release
  • Loading branch information
shin- authored Jun 28, 2017
2 parents 706e2ca + 3d84dbe commit 65e01f2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker/utils/ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def port_range(start, end, proto, randomly_available_port=False):


def split_port(port):
port = str(port)
match = PORT_SPEC.match(port)
if match is None:
_raise_invalid_port(port)
Expand Down
2 changes: 1 addition & 1 deletion docker/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "2.4.0"
version = "2.4.1"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
10 changes: 10 additions & 0 deletions docs/change-log.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Change log
==========

2.4.1
-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/35?closed=1)

### Bugfixes

* Fixed a bug where the `split_port` utility would raise an exception when
passed a non-string argument.

2.4.0
-----

Expand Down
3 changes: 3 additions & 0 deletions tests/unit/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ def test_with_no_container_port(self):
def test_split_port_empty_string(self):
self.assertRaises(ValueError, lambda: split_port(""))

def test_split_port_non_string(self):
assert split_port(1243) == (['1243'], None)

def test_build_port_bindings_with_one_port(self):
port_bindings = build_port_bindings(["127.0.0.1:1000:1000"])
self.assertEqual(port_bindings["1000"], [("127.0.0.1", "1000")])
Expand Down

0 comments on commit 65e01f2

Please sign in to comment.