Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Jun 26, 2023
2 parents f779107 + cc64717 commit 5aa8074
Show file tree
Hide file tree
Showing 13 changed files with 873 additions and 151 deletions.
6 changes: 5 additions & 1 deletion cookbook/integration/default.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import traceback
from io import BytesIO, StringIO
from re import match
from zipfile import ZipFile
Expand All @@ -19,7 +20,10 @@ def get_recipe_from_file(self, file):
recipe = self.decode_recipe(recipe_string)
images = list(filter(lambda v: match('image.*', v), recipe_zip.namelist()))
if images:
self.import_recipe_image(recipe, BytesIO(recipe_zip.read(images[0])), filetype=get_filetype(images[0]))
try:
self.import_recipe_image(recipe, BytesIO(recipe_zip.read(images[0])), filetype=get_filetype(images[0]))
except AttributeError as e:
traceback.print_exc()
return recipe

def decode_recipe(self, string):
Expand Down
Loading

0 comments on commit 5aa8074

Please sign in to comment.