Skip to content

Commit 3804bcb

Browse files
committed
Windows : str.splitlines instead of str.split
To be able to read `.dockerignore` file edited on Windows, python-py may use the multi-platform split function `str.splitlines()` Ref : https://docs.python.org/2/library/stdtypes.html#str.splitlines
1 parent 01654ee commit 3804bcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
322322
exclude = None
323323
if os.path.exists(dockerignore):
324324
with open(dockerignore, 'r') as f:
325-
exclude = list(filter(bool, f.read().split('\n')))
325+
exclude = list(filter(bool, f.read().splitlines()))
326326
# These are handled by the docker daemon and should not be
327327
# excluded on the client
328328
if 'Dockerfile' in exclude:

0 commit comments

Comments
 (0)