forked from josch/img2pdf
Add check for empty list
This commit is contained in:
parent
b2c3b641db
commit
32b4ed1f43
1 changed files with 3 additions and 0 deletions
|
@ -1991,6 +1991,9 @@ def convert(*images, **kwargs):
|
|||
|
||||
if not isinstance(images, (list, tuple)):
|
||||
images = [images]
|
||||
else:
|
||||
if len(images) == 0:
|
||||
raise ValueError("Unable to process empty list")
|
||||
|
||||
for img in images:
|
||||
# img is allowed to be a path, a binary string representing image data
|
||||
|
|
Loading…
Reference in a new issue