From 74586cdd4c661ecc4a3e3bd64fafedde7f121d5e Mon Sep 17 00:00:00 2001 From: Wanzhi Du Date: Mon, 5 Mar 2018 19:26:56 +0800 Subject: [PATCH] Fix flake8 case Signed-off-by: Wanzhi Du --- docker/api/build.py | 3 ++- tests/integration/api_build_test.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/api/build.py b/docker/api/build.py index 6dab14dc..e136a6ee 100644 --- a/docker/api/build.py +++ b/docker/api/build.py @@ -143,7 +143,8 @@ class BuildApiMixin(object): if os.path.exists(dockerignore): with open(dockerignore, 'r') as f: exclude = list(filter( - lambda x: x != '' and x[0] != '#', [l.strip() for l in f.read().splitlines()] + lambda x: x != '' and x[0] != '#', + [l.strip() for l in f.read().splitlines()] )) context = utils.tar( path, exclude=exclude, dockerfile=dockerfile, gzip=gzip diff --git a/tests/integration/api_build_test.py b/tests/integration/api_build_test.py index a8c02796..ad5fbaa8 100644 --- a/tests/integration/api_build_test.py +++ b/tests/integration/api_build_test.py @@ -62,7 +62,7 @@ class BuildTest(BaseAPIIntegrationTest): '.dockerignore', '!ignored/subdir/excepted-file', '', # empty line, - '#', # comment line + '#', # comment line ])) with open(os.path.join(base_dir, 'not-ignored'), 'w') as f: