Fix flake8 case

Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
This commit is contained in:
Wanzhi Du 2018-03-05 19:26:56 +08:00
parent 7a28ff3510
commit 74586cdd4c
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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: