Kaydet (Commit) 74586cdd authored tarafından Wanzhi Du's avatar Wanzhi Du

Fix flake8 case

Signed-off-by: 's avatarWanzhi Du <wanzhi09@gmail.com>
üst 7a28ff35
......@@ -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
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment