Skip to content

Commit 35bc041

Browse files
committed
Handle breaking changes in repo2docker
jupyterhub/repo2docker#1421
1 parent 7f03340 commit 35bc041

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

repo2shellscript/shellscript.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ def __init__(self, *, parent):
237237
def build(
238238
self,
239239
*,
240+
push=False,
241+
load=False,
240242
buildargs=None,
241243
cache_from=None,
242244
container_limits=None,
@@ -264,6 +266,9 @@ def build(
264266
else:
265267
jupyter_token = str(uuid4())
266268

269+
# Ignore push and load args
270+
# https://github.com/jupyterhub/repo2docker/pull/1421
271+
267272
if kwargs:
268273
raise NotImplementedError("Additional kwargs not supported")
269274
# TODO: custom_context?
@@ -365,8 +370,11 @@ def images(self):
365370
return [Image(tags=[tag]) for tag in images]
366371

367372
def inspect_image(self, image):
368-
assert os.path.exists(os.path.join(self.output_directory, image))
369-
return Image(tags=[image])
373+
if os.path.exists(os.path.join(self.output_directory, image)):
374+
return Image(tags=[image])
375+
# https://github.com/jupyterhub/repo2docker/pull/1421
376+
# Return None if image doesn't exist
377+
return None
370378

371379
def push(self, image_spec):
372380
raise NotImplementedError("push() is not supported")

0 commit comments

Comments
 (0)