safe one if clause (intersection is already false-y)

pull/457/head
nuest 2018-11-05 18:51:10 +01:00
rodzic d12c4b54c3
commit b032a7cd27
1 zmienionych plików z 12 dodań i 13 usunięć

Wyświetl plik

@ -554,19 +554,18 @@ class BaseImage(BuildPack):
)) ))
except FileNotFoundError: except FileNotFoundError:
pass pass
if self.stencila_contexts: if {'py', 'pyjp'}.intersection(self.stencila_contexts):
if {'py', 'pyjp'}.intersection(self.stencila_contexts): assemble_scripts.extend(
assemble_scripts.extend( [
[ (
( "${NB_USER}",
"${NB_USER}", r"""
r""" ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache https://github.com/stencila/py/archive/f1260796.tar.gz && \
${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache https://github.com/stencila/py/archive/f1260796.tar.gz && \ ${KERNEL_PYTHON_PREFIX}/bin/python -m stencila register
${KERNEL_PYTHON_PREFIX}/bin/python -m stencila register """,
""", )
) ]
] )
)
if self.stencila_manifest_dir: if self.stencila_manifest_dir:
assemble_scripts.extend( assemble_scripts.extend(
[ [